2025-05-28 8:42 AM - last edited on 2025-05-28 12:36 PM by Pavel A.
Hello,
I followed https://community.st.com/t5/stm32-mcus/how-to-create-a-project-for-stm32h7-with-ethernet-and-lwip-stack/ta-p/49308 tutorial from the scratch to the end, including the Hello UDP part, and adding the "ETH CODE" code.
However, I can't ping my board.
After some debug, I found that I am locked in HAL_MspInit.
I tried this on 2 eval boards, with same results. I do not have further ideas to try.
Please find attached my projects.
Also, I wanted to know if FreeRTOS is mandatory for a project using Ethernet ?
If somebody have a "plug and play" project for STM32H757, I would be happy to try it out.
Thank you very much,
Matteo
Solved! Go to Solution.
2025-06-05 5:54 AM - edited 2025-06-05 5:55 AM
Hello,
0x1ff0a754 is at the bootloader range.
Check the SW1 switch position on the board:
Put it at the position 0
And with cube programmer check the Boot address in options bytes:
Mainly for BOOT=0 for CM7.
2025-05-28 12:44 PM
Try to use examples for STM32H747-DISCO : https://github.com/stm32-hotspot/STM32H7-LwIP-Examples/tree/main/STM32H747_Disco_M7_ETH
2025-06-02 6:02 AM
Hello @Pavel A.
I still can't ping my device, even with STM32H747-DISCO project.
I changed values in IP_ADDR4 function to put my computer address, and in LWIP init I changed the address to put an adress in the same network as my computer.
I have the green led next to my ethernet link, both in my computer and in the board, and when typing ipconfig in my cmd, it looks connected.
However, when trying to ping the board, I have impossible to join the board. I don't have any UDP signal, I looked on wireshark and have nothing sent by the board.
I added the Hello UDP part, and it still doesn't work.
I don't know if it is relevant, but I don't have the master output on the board when looking with an oscilloscope.
Tried on different boards and computer.
Best Regards,
Matteo
2025-06-02 7:07 AM
Hello,
If you can't ping the board even with the example provided in STM32CubeH7 package you need to check your network and your ETH cables.
So try to ping other devices on the network with the same Host, the same cables, same switch (if available) ..
2025-06-02 8:02 AM
Hello @mƎALLEm
I managed to get UDP message from an other device with the same host, same cable, so no issue from there.
When trying to debug, I see my code isn't fnishing "HAL init", going into HAL_InitTick, but never into HAL_MSPInit. (Did it through breakpoint, reaching breakpoint before HAL_MSPInit, but when pressing resume, doesn't reach HAL-MspInit.
Thank you
2025-06-02 8:13 AM
@Matteo-uC wrote:reaching breakpoint before HAL_MSPInit, but when pressing resume, doesn't reach HAL-MspInit.
So have you tried stepping into HAL_MSPInit ?
2025-06-02 8:35 AM
When debugging through breakpoint, I reach the breakpoint before HAL_InitTick, but I don't reach the breakpoint after HAL_InitTick (the one before MSPInit), so yes, I tried stepping into HAL_InitTick, and can't go though HAL_TIM_Base_Start_IT(&htim6).
Thank you very much
2025-06-02 8:49 AM - edited 2025-06-02 10:07 AM
@Matteo-uC wrote:
When debugging through breakpoint, I reach the breakpoint before HAL_InitTick, but I don't reach the breakpoint after HAL_InitTick (the one before MSPInit), so yes, I tried stepping into HAL_InitTick, and can't go though HAL_TIM_Base_Start_IT(&htim6).
Thank you very much
Check what HAL_InitTick() returns in stm32h7xx_hal.c:
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{
/* Check uwTickFreq for MisraC 2012 (even if uwTickFreq is a enum type that don't take the value zero)*/
if((uint32_t)uwTickFreq == 0UL)
{
return HAL_ERROR;
}
/* Configure the SysTick to have interrupt in 1ms time basis*/
if (HAL_SYSTICK_Config(SystemCoreClock / (1000UL / (uint32_t)uwTickFreq)) > 0U)
{
return HAL_ERROR;
}
/* Configure the SysTick IRQ priority */
if (TickPriority < (1UL << __NVIC_PRIO_BITS))
{
HAL_NVIC_SetPriority(SysTick_IRQn, TickPriority, 0U);
uwTickPrio = TickPriority;
}
else
{
return HAL_ERROR;
}
/* Return function status */
return HAL_OK;
}
2025-06-02 9:33 AM - edited 2025-06-02 9:34 AM
@Matteo-uC wrote:can't go though HAL_TIM_Base_Start_IT(&htim6).
What do you mean by that?
Do you get stuck inside HAL_TIM_Base_Start_IT ?
If so, where?
2025-06-03 12:54 AM
Hello,
I can't answer these questions, because when doing step by step debug and "go into", I can finish HAL_InitTick, and then, when doing step over with HAL_MspInit the IDE is showing
Break at address "0x1ff0a752" with no debug information available, or outside of program code.
I can finish HAL_MspInit if I do step by step, but then, the next function where I will make a step over will show me "break at address..."
That's why I only identified I have an issue with HAL_InitTick, because when debugging through breakpoint, I reach the breakpoint before HAL_InitTick, and not the breakpoint after, but I can't see what is happening inside.
Thank you