Problems and fixes for Ehernet

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problems and fixes for Ehernet

1,017 Views
martinbent
Contributor I

Hi,

We have been working through some problems we have seen with Ethernet startup when using FreeRTOS and lwip and have identified a couple of problems we'd like to report back for future fixes.  I couldn't find anywhere official to post bug fixes so thought I would post here.

These have been found in enet_ethernetif.c found in middleware/lwip/port.

  • In ethernetif_phy_init() if ENET_ATONEGOTIATION_TIMEOUT is set to zero we found that the PHY is never initialised.  We don't think the same TIMEOUT config should be used for both the Init loop and the auto-neg loop.
  • The speed and duplex variables may never be initialised but the caller then uses them to set the speed and duplex. So they are set to random values from the stack.
  • And we noticed the tight loop during init with a suggested fix here - https://community.nxp.com/t5/MCUXpresso-SDK/MCU-stops-if-ethernet-cable-is-not-plugged-in-on-startup...

I hope this is enough info to give back to the dev team.

Thanks,

Martin

0 Kudos
Reply
1 Reply

1,001 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @martinbent,

Thank you very much for sharing these pointers, we will contact the SDK development team for future revisions and fixes and confirm this information.

Best regards, Julian

0 Kudos
Reply