Ethernet Link Status is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-09 12:56 AM
Hi Team,
I need you support, I am using STM32F429zi, CubeMx Version 5.3.0, STM32Cube_FW_F4_V1.24.1, REERTOS_version 10.0.1 and Platform is atollic truestudio.
Issue: Ethernet UP/Down Link status
I enable,
#define LWIP_NETIF_STATUS_CALLBACK 1
#define LWIP_NETIF_LINK_CALLBACK 1
observation: Ethernet INT4 is not enable or is not heating.
Solved! Go to Solution.
- Labels:
-
Ethernet
-
STM32CubeMX
-
STM32F4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-10 12:09 AM
- Use "Code Snippet" feature, when posting code.
- Provide information about the board used.
- Debug the code.
Probably the PHY address is wrong...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-09 3:13 PM
Hello, are you speaking about PHY ETH4 IRQ line? It's not enabled by the ETH low level driver, neither the stack sets up any external interrupt on any GPIO pin.
You have to do this manually.
LWIP/ST implementation uses a thread to check the status of PHY by polling.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-09 8:41 PM
Thank you sir for replay, Yes , I mean PHY ETH4 IRQ line
I checked LWIP status thread , But there also i am not getting the Link down or up status but thread is running.
LWIP thread code :-
void ethernetif_set_link(void const *argument)
{
uint32_t regvalue = 0;
struct link_str *link_arg = (struct link_str *)argument;
for(;;)
{
/* Read PHY_BSR*/
HAL_ETH_ReadPHYRegister(&heth, PHY_BSR, ®value);
regvalue &= PHY_LINKED_STATUS;
/* Check whether the netif link down and the PHY link is up */
if(!netif_is_link_up(link_arg->netif) && (regvalue))
{
/* network cable is connected */
netif_set_link_up(link_arg->netif);
}
else if(netif_is_link_up(link_arg->netif) && (!regvalue))
{
/* network cable is dis-connected */
netif_set_link_down(link_arg->netif);
}
/* Suspend thread for 200 ms */
osDelay(200);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-10 12:09 AM
- Use "Code Snippet" feature, when posting code.
- Provide information about the board used.
- Debug the code.
Probably the PHY address is wrong...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-10 12:35 AM
Yes you are write, I changed the PHY Address and stated working. PHY_ADDRESS 0.
Thanks..
