cancel
Showing results for 
Search instead for 
Did you mean: 

LAN8742 infinite loop bug

JZamo
Associate

Hi,

I think there is a missing break statement in lan8742.c:170. In current version, if the code ever gets to line 170 (status = LAN8742_STATUS_RESET_TIMEOUT;) it will be stuck in an infinite loop. Adding break statement after this line fixes the problem.

How I found this: My application needs Ethernet to work, so I added a system reset into ethernet_link_status_updated() in case netif is not up. If there is no Ethernet cable connected, this will cause that the system initializes ethernet and then resets itself since the netif will not be up. This goes on periodically for 15 - 30 minutes, but then eventually sooner or later the system will become stuck in the infinite loop described above.

1 ACCEPTED SOLUTION

Accepted Solutions
Imen.D
ST Employee

Hello @JZamo​ ,

Thank you for your contribution.

This issue is resolved with the new STM32H7 Cube firmware package.

Best Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

1 REPLY 1
Imen.D
ST Employee

Hello @JZamo​ ,

Thank you for your contribution.

This issue is resolved with the new STM32H7 Cube firmware package.

Best Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen