Skip to main content
itxs
Associate II
June 24, 2021
Solved

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

  • June 24, 2021
  • 3 replies
  • 5685 views

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.

This topic has been closed for replies.
Best answer by itxs

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

3 replies

ST Technical Moderator
June 24, 2021
In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
itxs
itxsAuthor
Associate II
June 24, 2021

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