cancel
Showing results for 
Search instead for 
Did you mean: 

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

HSant.1
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

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

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
Peter BENSCH
ST Employee

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

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
HSant.1
Associate II

Ok, Changing the PHY_SPEED_STATUS solved the problem.

Thanks a lot