cancel
Showing results for 
Search instead for 
Did you mean: 

How to run CubeMX-generated LWIP with LAN8742? DHCP doesn't work, but ST'example works.

itxs
Associate II

Hello, I am trying to run a project generated by STM32cubeMX. DHCP thread code I got from ST example called "STM32H723 webserver demo" and put it to my code. Communication between PHY and STM32 works well, DHCP doesn't work. Even if I put a static IP, it doesn't connect to my router. But if I download that ST webserver example, everything is ok, and DHCP works. Where is the problem? I did Lwip configuration via CubeMX equal to Lwip configuration in that ST example, everything other is the same (linker areas, MPU config, etc). I haven't in my project an HTTP server yet, I just want to ping my device from my PC. DHCP stops at SELECTING state.

1 ACCEPTED SOLUTION

Accepted Solutions

My bad, I forgot to add the controlling of nRST pin. Stupid mistake.

View solution in original post

3 REPLIES 3
Imen.D
ST Employee

Hello @itxs​ ,

Did you tried to follow theses articles:

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Thank you, now I did all like in these articles, but nothing changed, DHCP hold in SELECTING state

My bad, I forgot to add the controlling of nRST pin. Stupid mistake.