2024-11-11 09:37 AM
Hello:
I have followed this exactly...
https://community.st.com/t5/stm32-mcus/how-to-use-sntp-over-lwip-and-rtc-with-an-stm32/ta-p/736706
I am using STM32CubeIDE V1.16.1 with a NUCLEO-H723ZG board.
There are no errors or warnings.
The code runns and I get...
SNTP Client
NUCLEO-H723ZG board
State: Ethernet Initialization ...
State: Looking for DHCP server ...
DHCP Timeout !!
Static IP address: 192.168.0.192
There is no red error light etc..
Can anyone help or perhaps B.Montanari ST Employee, (the author) etc. ?\
Thanks.
2024-11-11 09:49 AM
@BFlin.1 wrote:State: Looking for DHCP server ...
DHCP Timeout !!
So do you have a DHCP server on the network?
2024-11-11 10:12 AM
Hello @BFlin.1 ,
Check your static IP address configurations. Make sure to enable the CPU DCache.
You can try this Nx_SNTP_Client example available in GitHub page and get inspired from this example to use it with Nucleo-H723ZG by following the instructions in the readme file.
2024-11-12 05:39 AM
C:\Windows\SysWOW64>ipconfig /all | find /i "DHCP Server"
DHCP Server . . . . . . . . . . . : 10.0.0.1
2024-11-12 05:49 AM
2024-11-12 05:55 AM
That's the DHCP server that your PC is using.
What about your STM32 ?
2024-11-12 06:08 AM
So what's your setup, direct connection STM32 ETH to PC ethernet port?
As Andrew says, your STM32 cannot simply connect to some DHCP server via your PC.
Maybe you can find a PC app, or maybe your switch has a DHCP server function?
2024-11-13 07:23 AM
<So what's your setup, direct connection STM32 ETH to PC ethernet port?>
No, I am using straight cable to switch that goes to internet router.
2024-11-14 03:31 AM
Then check if your router has a DHCP server that can be activated.