Skip to main content
Visitor II
December 6, 2021
Solved

I think I found an error in the ethernet HAL for the STM32F4 , can you confirm ?

  • December 6, 2021
  • 2 replies
  • 1058 views

The code after the LAN speed auto detection is this :

line 443 @stm32f4xx_hal_eth.c

  if((phyreg & PHY_SPEED_STATUS) == PHY_SPEED_STATUS)

  {  

   /* Set Ethernet speed to 10M following the auto-negotiation */

   (heth->Init).Speed = ETH_SPEED_10M;

  }

  else

  {  

   /* Set Ethernet speed to 100M following the auto-negotiation */

   (heth->Init).Speed = ETH_SPEED_100M;

  }

I think that the speed selection is inverted, I reverse the values and the interface start working

    This topic has been closed for replies.
    Best answer by Peter BENSCH

    No, the setting depends on the PHY being used. and the value of PHY_SPEED_STATUS.

    Regards

    /Peter

    2 replies

    Technical Moderator
    December 6, 2021

    No, the setting depends on the PHY being used. and the value of PHY_SPEED_STATUS.

    Regards

    /Peter

    HSant.1Author
    Visitor II
    December 6, 2021

    Ok, Changing the PHY_SPEED_STATUS solved the problem.

    Thanks a lot