Task stops while initializing FreeRTOS_IP

Hi,
I’m running a simple LED blinking task with FreeRTOS. This is running without any issues. But if i initialize FreeRTOS+TCP stack using FreeRTOS_IPInit(), the LED blink task is not working. Please help me resolve this. !

Regards,
–Aswin.

What did you do to find the problem ?
Did you define configASSERT , enabled stack overflow checking and maybe also configUSE_MALLOC_FAILED_HOOK (see Hook Functions doc ) for development/debugging ?
Maybe you just run out of heap space ?

Hi @hs2 ,

I put a breakpoint inside my LED_BLINK task. Without FreeRTOS_IPInit(), i was able to get breakpoint hit inside the LED_BLINK_TASK. After IPInit() I was not able to see my LED blink.

configASSERT is defined as,
#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }

Also enabled stackoverflow_hook and enabled configUSE_MALLOC_FAILED_HOOK . The code is neither going to stack overflow or fail_hook_event.

Regards,
–Aswin.

Even i tried to put a breakpoint inside prvIPTask() function (which is created by FreeRTOS_IPInit() ) . It hits 2times, after that the breakpoint is not hit inside prvIPTask() function.

And when you stop/halt the target after as while has the program stopped in the configASSERT forever loop ?

No, control is at vApplicationIdleHook()

Seems ok so far. If the Idle task runs (vApplicationIdleHook is called periodically) there is no lifelock or crash and the LED blinking task should get the CPU to run.
Maybe you need to step through the blink code to see what’s wrong. Hard to tell without the code…

1 Like

Hi @hs2 ,

I found the problem. I tried commenting the ETHERNET peripheral initialisation inside xNetworkInterfaceInitialise() function and just returned pdTRUE. Now the LED task works properly. Something to do with my ETH peripheral init.

Thanks. !!!