Associate III
May 10, 2019
Question
HAL_ETH_ReadPHYRegister always returns HAL_TIMEOUT
- May 10, 2019
- 2 replies
- 1619 views
Hello there....
On one of my product has LAN8742A phy ic for the Ethernet. for me everything is working great. in-fact i can create TCP server and client application with FreeRTOS
Now the problem is, i just need to check the link status by reading the PHY register that is PHY_BSR .
I have made the function to get the Eth link status as follow
if((HAL_ETH_ReadPHYRegister(&VapEth, PHY_BCR, &phyreg)) == HAL_OK){
if((phyreg & PHY_LINKED_STATUS)==0){
/* Return Link Down status */
printf("LAN8742_STATUS_LINK_DOWN");
}
if((phyreg & PHY_LINKED_STATUS)==1){
/* Return Link Up status */
printf("LAN8742_STATUS_LINK_UP");
}
}Now the problem is HAL_ETH_ReadPHYRegister always returns HAL_TIMEOUT!
I need some help from the community
Thanks...
