Skip to main content
Visitor II
May 15, 2019
Solved

LAN8742 infinite loop bug

  • May 15, 2019
  • 1 reply
  • 778 views

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.

    This topic has been closed for replies.
    Best answer by Imen.D

    Hello @JZamo​ ,

    Thank you for your contribution.

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

    Best Regards,

    Imen

    1 reply

    Imen.DAnswer
    Technical Moderator
    February 11, 2020

    Hello @JZamo​ ,

    Thank you for your contribution.

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

    Best Regards,

    Imen