Skip to main content
Visitor II
April 15, 2017
Solved

#define LAN8742A_PHY_ADDRESS

  • April 15, 2017
  • 2 replies
  • 1389 views
Posted on April 15, 2017 at 13:11

This bug has been reported before, but has survived a couple of cube version bumps.

STM32CubeMX 4.20.1 and f7_cube 1.6.1

in stm32f7xx_hal_conf.h it defines the PHY address incorrectly

#define LAN8742A_PHY_ADDRESS           1

should be

#define LAN8742A_PHY_ADDRESS           0

A symptom of this bug is HAL_ETH_ReadPHYRegister returning 0xFFFF for literally everything, and your cube-generated ethernet code won't work.

    This topic has been closed for replies.
    Best answer by STTwo-32

    Hello @lprobsth 

    It seems to be solved on my side using the STM32CubeF7 V1.17.2 and the STM32CubeMX V6.13.0. Could you please test it and get back to us if it is solved or if you still have the same issue (in this case, please attach your .ioc file).

    Best Regards.

    STTwo-32

    2 replies

    Explorer
    January 11, 2025

    It is 2025 and this bug is still present.

    I found it since link up and down events are not registered with the default configuration for ethernet and lwIP.

    After changing the LAN8742A_PHY_ADDRESS both the link events and the relevant interrupt work.

    I still wonder why this did not have an effect on the Basic Control Register (BCR) commands (or why nobody at ST was annoyed enough by this bug over the years).

    Technical Moderator
    January 12, 2025

    Dear @lprobsth ,

    Thank you for spotting again this confirmed issue , It will be logged In our Internal defect system . Sorry for the inconvenience that it may caused .

    Regards,

    STOne-32

    STTwo-32Answer
    Technical Moderator
    January 13, 2025

    Hello @lprobsth 

    It seems to be solved on my side using the STM32CubeF7 V1.17.2 and the STM32CubeMX V6.13.0. Could you please test it and get back to us if it is solved or if you still have the same issue (in this case, please attach your .ioc file).

    Best Regards.

    STTwo-32