Skip to main content
Associate
April 30, 2025
Solved

Why doesn't DHCP work when I run the Nx_SNTP_Client example on Stm32CubeMX?

  • April 30, 2025
  • 4 replies
  • 1831 views

I chose the Nx_SNTP_Client example through MX and created a STM32CubeIDE project. The board I'm using is STM32H747I-DISCO.

When I run it on the board, I only get the message "The network cable is connected." and I can't get a DHCP IP. When I try to debug, Tx doesn't run even once.
Please help.

Paul_100_0-1745995603243.png

 

Best answer by ASEHST

Hello @Paul_100,

I want to assure you that all the Ethernet-related examples have been thoroughly tested and are functioning as expected. After the message "The network cable is connected," the assigned IP address is displayed correctly.

Since the examples are working properly in our environment, it appears that the issue may be related to network configuration on your side. Please ensure that there are no network restrictions or issues that might block DHCP requests. Additionally, I recommend connecting another device to the same network port to verify if it receives an IP address.

 

With regards, 

4 replies

ST Employee
May 5, 2025

Hello,

Thank you for your report. Could you please specify the versions of STM32CubeMX and STM32CubeIDE you are using?

Additionally, kindly let us know if you have made any modifications to the example.

 

With Regards.

"If your question is answered, please close this topic by clicking ""Accept as Solution""."
Paul_100Author
Associate
May 7, 2025

Hello,

I also checked if DHCP works on the NUCLEO-H723ZG board. The Ethernet-related examples supported by MX on the NUCLEO-H723ZG board include TCP echo client and TCP echo server, and both examples use DHCP. In these examples, only the message "The network cable is connected." is displayed, and the assigned IP is not displayed. When measuring the TX signal through the scope, no signal is output.

Paul_100_0-1746579230461.png

Please help.

Paul_100Author
Associate
May 6, 2025

 

STM32CubeMX  : ver 6.14.0

STM32CubeIDE : ver  1.18.0

 

I did not modify the example.

thank you.

ASEHSTAnswer
ST Employee
May 7, 2025

Hello @Paul_100,

I want to assure you that all the Ethernet-related examples have been thoroughly tested and are functioning as expected. After the message "The network cable is connected," the assigned IP address is displayed correctly.

Since the examples are working properly in our environment, it appears that the issue may be related to network configuration on your side. Please ensure that there are no network restrictions or issues that might block DHCP requests. Additionally, I recommend connecting another device to the same network port to verify if it receives an IP address.

 

With regards, 

"If your question is answered, please close this topic by clicking ""Accept as Solution""."
Paul_100Author
Associate
May 9, 2025

I found the cause of the problem.
There was a typo in the Ethernet DMA section of the project created by CubeMX.
You can fix the following in the STM32H747XIHX_FLASH.ld file.

Paul_100_0-1746765067082.png

 

 

RxDecripSection ==> RxDescripSection
TxDecripSection ==>TxDescripSection

Thank you.