2026-04-17 8:00 AM - last edited on 2026-04-17 8:28 AM by mƎALLEm
Added "DHCP" in the title to give the context.
Using an STM32H7S78-DK I try to set up the network to join an IPv4 network through DHCP.
I did set up the board using CubeMX, standard configuration, MPU activated.
FreeRTOS + LwIP
Removed all other interfaces I don't need.
Made sure the Ethernet clock shows 50MHz
The LED's on the RJ45 start to blink (Orange LED blinks with packets exchanged)
but I get no IP address.
digging in the possibilities I added a simple routine to monitor the DHCP advancements.
struct dhcp *dhcp_data = netif_dhcp_data(&gnetif);
if (dhcp_data != NULL) {
printf("[DHCP] State: %d, Retries: %d\r\n", dhcp_data->state, dhcp_data->tries);
}
this shows I get stuck in state 6: waiting for an ACK
-> what could be behind this?
can someone share an .ioc file that sets everything correctly in MX?
Solved! Go to Solution.
2026-05-12 5:00 AM
Some extra experimenting: changed the MCU voltage to 1.8V and the network behaves exactly as with the -DK board: DHCP-Timeout
Back to 3V3 an the DHCP process is successful.
Went back to the original board and found no option to alter the MCU Vdd.
But I found a header jp6, which I was not really getting any wiser on what it does.
search through the schematics relates it to the RMII, what if?
Tried to alter this setting and the DHCP server is responding.
-> JP6 needs to be in position PC1
2026-04-17 8:09 AM
Hello,
What do you mean by "DORA" in the title?
2026-04-17 8:15 AM
Discover
Offer
Request
Acknowledge
The packet exchange procedure of the DHCP proces
2026-04-17 8:20 AM
Hello @GStou,
First things first, could you please answer the following questions to help me better understand the issue?
Best regards,
2026-04-17 8:54 AM
Some LwIP debug/diagnostic tips/resources:
2026-04-21 7:03 AM
I tried to reproduce the situation, as I was not trusting the waiting for ACK situation.
If true, the IP address should have been listed on the router DHCP server.
Now the board doesn't even identify the presence of the Ethernet cable anymore. LED's are on.
LED's could simply be the driver chip identifying the electric status of a connected Ethernet cable.
Can it be that I changed bit's on the board/µC that make things go bad?
Settings that remain over reprogramming?
2026-04-21 8:53 AM
Hello @GStou,
Have you tried inspecting the following project available in our GitHub repository? Please focus on the LwIP configuration and the DHCP implementation in the application, as the issue may be related to a misconfiguration in DHCP or the descriptors:
Best regards,
2026-04-21 8:56 AM
Additionally, could you attach your STM32CubeMX configuration (.ioc) file, lwip.c, lwipopts.h, ethernetif.c, and the linker file so I can review your configuration and determine the most likely misconfiguration?
2026-05-06 6:38 AM
Hello,
Sorry for replying so slow, had other tasks to complete.
I took the STM32H7RS cube package from the ST Website:
https://www.st.com/en/embedded-software/stm32cubeh7rs.html
installed it on my board, as explained in the readme document.
The TFTP server starts byt claims no DHCP server responds:
TFTP Server
STM32H7S78-DK board
State: Ethernet Initialization ...
State: Looking f or DHCP server ...
DHCP Timeout !!
Static IP address: 192.168.0.10Using the same cable, a W11 laptop immediately gets and address.
I also tried the screen driver, which worked.
2026-05-06 6:45 AM
Hello @GStou,
It is not the same situation with the laptop. The laptop can contact the DHCP server on your network, whereas when you connect the STM32 board to your laptop, it cannot do the same thing. To solve this, you need to install a local DHCP server so it can assign an IP address to your board when it is plugged in. Try downloading and installing an application like Tftpd64; it should solve this issue.
Best regards,