cancel
Showing results for 
Search instead for 
Did you mean: 

Can't make Ethernet work for STM32H757I-EVAL

Matteo-uC
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

0x1ff0a754 is at the bootloader range.

Check the SW1 switch position on the board:

mALLEm_0-1749127812599.png

Put it at the position 0

And with cube programmer check the Boot address in options bytes:

mALLEm_2-1749128079385.png

Mainly for BOOT=0 for CM7.

 

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

24 REPLIES 24
Pavel A.
Super User

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

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

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

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

 


@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 ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

@Andrew Neil 

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


@Matteo-uC wrote:

@Andrew Neil 

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; }

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

@Matteo-uC wrote:

@Andrew Neil 

 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?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
Matteo-uC
Associate III

@Andrew Neil @mÆŽALLEm 

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