cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4XX HAL ETH initial LAN8720A bug

liu yong
Associate II
Posted on August 08, 2017 at 09:43

My hardware is F429 + LAN8720A, firmware is STM32Cube_FW_F4_V1.16.0

when power up, everything is ok,  PHY_BCR = 0x3100, phy link up, at this time I just reset f429, 

PHY_B

C

R = 0x2100, PHY link failed, and the two leds are off.Here are some codes in the HAL driver:

0690X00000607x9QAA.png

My question is after reset we should set the BCR, but the HAL driver reset the BCR, then just wait link up, is that right?

This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
liu yong
Associate II
Posted on August 08, 2017 at 09:57

F429 reset pin and LAN8720A  reset pin use the same reset signal. I use the HAL_NVIC_SystemReset() to soft reset F429.

Now I add HAL_ETH_WritePHYRegister(heth, PHY_BCR, PHY_AUTONEGOTIATION) after  HAL_Delay(PHY_RESET_DELAY);