# Task stops while initializing FreeRTOS\_IP

**URL:** <https://forums.freertos.org/t/task-stops-while-initializing-freertos-ip/13762>\
**Category:** Libraries\
**Tags:** debug\
**Created:** [October 27, 2021, 12:17pm UTC](https://forums.freertos.org/t/task-stops-while-initializing-freertos-ip/13762 "2021-10-27T12:17:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aswin5005](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@Aswin5005](https://forums.freertos.org/u/Aswin5005)\
**Post date:** [October 27, 2021, 12:17pm UTC](https://forums.freertos.org/t/task-stops-while-initializing-freertos-ip/13762/1 "2021-10-27T12:17:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hs2](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hs2](https://forums.freertos.org/u/hs2)\
**Post date:** [October 27, 2021, 12:37pm UTC](https://forums.freertos.org/t/task-stops-while-initializing-freertos-ip/13762/2 "2021-10-27T12:37:47Z")

</div>

What did you do to find the problem ?  
Did you define [configASSERT](https://www.freertos.org/a00110.html?_ga=2.213540052.1971135108.1609110559-800452554.1575115350#configASSERT), enabled [stack overflow checking](https://www.freertos.org/Stacks-and-stack-overflow-checking.html) and maybe also configUSE\_MALLOC\_FAILED\_HOOK (see [Hook Functions doc](https://www.freertos.org/a00016.html)) for development/debugging ?  
Maybe you just run out of heap space ?

---

<div class="post-metadata">

**Author:** ![Aswin5005](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@Aswin5005](https://forums.freertos.org/u/Aswin5005)\
**Post date:** [October 27, 2021, 12:41pm UTC](https://forums.freertos.org/t/task-stops-while-initializing-freertos-ip/13762/3 "2021-10-27T12:41:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Aswin5005](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@Aswin5005](https://forums.freertos.org/u/Aswin5005)\
**Post date:** [October 27, 2021, 12:56pm UTC](https://forums.freertos.org/t/task-stops-while-initializing-freertos-ip/13762/4 "2021-10-27T12:56:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hs2](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hs2](https://forums.freertos.org/u/hs2)\
**Post date:** [October 27, 2021, 1:01pm UTC](https://forums.freertos.org/t/task-stops-while-initializing-freertos-ip/13762/5 "2021-10-27T13:01:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Aswin5005](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@Aswin5005](https://forums.freertos.org/u/Aswin5005)\
**Post date:** [October 27, 2021, 1:02pm UTC](https://forums.freertos.org/t/task-stops-while-initializing-freertos-ip/13762/6 "2021-10-27T13:02:21Z")

</div>

No, control is at vApplicationIdleHook()

---

<div class="post-metadata">

**Author:** ![hs2](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hs2](https://forums.freertos.org/u/hs2)\
**Post date:** [October 27, 2021, 1:11pm UTC](https://forums.freertos.org/t/task-stops-while-initializing-freertos-ip/13762/7 "2021-10-27T13:11:51Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![Aswin5005](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@Aswin5005](https://forums.freertos.org/u/Aswin5005)\
**Post date:** [October 27, 2021, 1:21pm UTC](https://forums.freertos.org/t/task-stops-while-initializing-freertos-ip/13762/8 "2021-10-27T13:21:29Z")

</div>

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. !!!
