Skip to main content
liu yong
Associate II
August 8, 2017
Question

STM32F4XX HAL ETH initial LAN8720A bug

  • August 8, 2017
  • 1 reply
  • 1102 views
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 topic has been closed for replies.

    1 reply

    liu yong
    liu yongAuthor
    Associate II
    August 8, 2017
    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);