Skip to main content
Akash_k
Associate III
May 29, 2020
Question

in STM32H7 ping only works when reset button is pressed but not working when i completely shut off the supply and restart the mcu?

  • May 29, 2020
  • 4 replies
  • 2223 views

I am working on STM32H743VIT6 and using LAN8742 as phy. i generated the project using stmcube using repository stm32h7 1.5.0 . I used the same mpu and system clock configuration as in the ST examples. When I switched on the supply to mcu, the ping does not work. After pressing the reset button , ping started working.

Please find the attached system clock, mpu and lwipopts code.

This topic has been closed for replies.

4 replies

turboscrew
Senior III
May 29, 2020

It is possible that Cube tries to initialize the chip too soon.

By the data sheet, it takes at least about 26 ms from the power-on before trying to communicate with it. Probably a longer delay is needed.

That 26 ms is a "HW start-up time", so it may be too short, but I didn't do any further investigations.

Akash_k
Akash_kAuthor
Associate III
May 30, 2020

Thank you, It worked but I had to introduce delay of 500 ms and 1 second in the initialization. I hope it works when I enable other modules of the MCU.

int main(void)

{

 MPU_Config();

 SCB_EnableICache();

 SCB_EnableDCache();

 HAL_Init();

 SystemClock_Config();

HAL_Delay(500);

 MX_GPIO_Init();

HAL_Delay(1000);

 MX_LWIP_Init();

 while (1)

 {

MX_LWIP_Process();

 }

}

Piranha
Principal III
May 30, 2020

https://community.st.com/s/question/0D50X0000C6eNNSSQ2/bug-fixes-stm32h7-ethernet

https://community.st.com/s/question/0D50X0000AhNBoWSQW/actually-working-stm32-ethernet-and-lwip-demonstration-firmware

In other words it does not work and will not work in a foreseeable future, because the intellectual capability of HAL/Cube developers is too low to even understand these problems.

MStro.4
Associate
November 26, 2021

@Community member​ 

Hey,

did you solve this problem?

I have an identical problem to yours on the same processor (STM32H743VIT6). After powering my PCB, I have to reset the entire system to make the LAN8742A work properly.