cancel
Showing results for 
Search instead for 
Did you mean: 

LwIP not running properly on STM32H7S78-DK

hobbyloseruser
Associate

 

Hey ST-Community,

I’m working with an STM32H7S78-DK board and trying to get Ethernet running. TouchGFX and FreeRTOS are working fine, but I’m stuck with lwIP. The task starts, but DHCP never succeeds (the printed IP is always 0.0.0.0). I also tried with a static IP, but I still can’t ping the board. Deactivating TouchGFX didn't help.

I've followed this video: STM32 : How to Get an IP Address via DHCP on STM32H7S78-DK with LwIP using IAR EWARM

LwIP has the following memory settings:

  1. MEM_SIZE = 14*1024Bytes
  2. TCPIP_THREAD_SIZE = 4 * 1024Bytes

I've configured the MPU as well following the given Video.

I’m not sure where to look next – maybe I’m missing some configuration step? Has anyone successfully used lwIP with this board and could give me a hint?

Thanks a lot in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
hobbyloseruser
Associate

Hello, thanks a lot for the quick reply!

That really helped me fix the issue. In Wireshark I noticed that the whole DHCP sequence was missing, which led me to take a closer look at my configuration.

I was able to solve it by reconfiguring some ETH settings and adjusting the task priorities.

For anyone facing similiar issues:

  1. Double-check the ETH pinout and jumpers on your board against CubeMX.
  2. Ensure that the TouchGFX task has a higher priority than the lwIP tasks, otherwise the display might crash (at least for me).

 

Again, thanks a lot! ^^

View solution in original post

2 REPLIES 2
STackPointer64
ST Employee

Hello @hobbyloseruser, and welcome to ST Community!

Could you try enabling DHCP, regenerating the project, and monitoring the traffic using a tool like Wireshark? This will help us determine if the DHCP four-step sequence—Discover, Offer, Request, Acknowledge (DORA)—is halting mid-communication or not occurring at all. Also, for DHCP to work, you need to connect your board either directly to your router or to your computer with a DHCP server running. Please check these points and get back to me with your feedback.

Best regards,

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.
hobbyloseruser
Associate

Hello, thanks a lot for the quick reply!

That really helped me fix the issue. In Wireshark I noticed that the whole DHCP sequence was missing, which led me to take a closer look at my configuration.

I was able to solve it by reconfiguring some ETH settings and adjusting the task priorities.

For anyone facing similiar issues:

  1. Double-check the ETH pinout and jumpers on your board against CubeMX.
  2. Ensure that the TouchGFX task has a higher priority than the lwIP tasks, otherwise the display might crash (at least for me).

 

Again, thanks a lot! ^^