Problem with DHCP and FreeRTOS

mathias3 wrote on Thursday, March 19, 2009:

I have an example application for my target hardware (ATMEL EVK1100 / AT32UC3A0512) which runs the lwIP stack in a FreeRTOS task.

I tried to activate DHCP for my application. This seems to work fine. At least I can obtain an IP address from the DNS. The problem is that it only works as long as the task priority is set to 7 or 8 (maximum is configured to 8). With lower priorities a ping to the given address stays unanswered. The high priority has the bad effect of starving my other tasks.

Has anybody an idea what problem I am facing? Similar experiences?
Thanks for your opinion. Regards,

edwards3 wrote on Thursday, March 19, 2009:

That really depends how you have written the Ethernet driver, the priority of other tasks in the system, and what the other tasks in the system are doing.

mathias3 wrote on Thursday, March 19, 2009:

Thanks for your reply. One thing that is strange anyway: Even when I only start the Ethernet task PING only works with task priority 7 or 8. What else could cause the problems? Are there any other tasks running by default which could block my Ethernet task?

rtel wrote on Thursday, March 19, 2009:

Only the idle task, but that runs at priority 0 so will not cause this behaviour.

Most ports of lwIP will generate at least two tasks, maybe the priorities relative to each other are wrong.


yyang2000 wrote on Friday, March 20, 2009:


If anyone knows a sample or demo application runs lwIP stack with FreeRTOS on LM3S6965 (Cortex-M3)? I have a demo application (Cortex_M3_IAR_Keil) that runs only uIP stack without DHCP functionality. So if I need to DHCP, I need to run lwIP stack, right?

Bill Yang

rtel wrote on Friday, March 20, 2009:

I have some code I could send although I don’t know if it uses DHCP or not.  There is an ARM9 lwIP demo that uses DHCP you could look at though.  uIP should also work with DHCP.

If you want the code write to me at r (dot) barry _at_  Don’t use the SourceForge email service as I have no idea how it works.