cancel
Showing results for 
Search instead for 
Did you mean: 

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

Paul_100
Associate II

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
ASEHST
ST Employee

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".

View solution in original post

5 REPLIES 5
ASEHST
ST Employee

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_100
Associate II

 

STM32CubeMX  : ver 6.14.0

STM32CubeIDE : ver  1.18.0

 

I did not modify the example.

thank you.

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.

ASEHST
ST Employee

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_100
Associate II

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.