imxrt-hal icon indicating copy to clipboard operation
imxrt-hal copied to clipboard

Export, demonstrate ENET peripheral

Open mciantyre opened this issue 7 months ago • 2 comments

The rtic_enet_dhcp_tcp.rs example runs a DHCP client on an i.MX RT 1170EVK. Once assigned an IP address, it creates a TCP socket that loops back any data sent to it. The example demonstrates some support for smoltcp. It depends on a prototype driver, imxrt-enet, which I'm still thinking through.

The example works on my 1170EVK with my router, but there's still more to do. In particular, I can't bring the speed up to 100Mbit/s; if I try, the receive path doesn't work reliably. MIB statistics show CRC and alignment errors for receive, but transmit is fine. I'm notably not bringing up the Ethernet PLL, so next step might be to rule out clock quality issues. Until then, you're playing with a 10Mbit/s driver, enforced by a restricted PHY autonegotiation.

mciantyre avatar Nov 26 '23 20:11 mciantyre

I'm notably not bringing up the Ethernet PLL, so next step might be to rule out clock quality issues.

I linked with SDK code to simplify PLL1 bringup, remuxed ENET clocks, forced a 100Mbit/s PHY autonegotation, and disabled the 10Mbit/s driver config. There's no more CRC or alignment errors in the receive path, and the example works as expected.

Looks like it's time for the inevitable: make the 1170 clocks useful. What's this analog IP interface thing...?

mciantyre avatar Nov 27 '23 13:11 mciantyre

A single setpoint also works for PLL1 bring-up, with no analog IP interface needed. The MAC and PHY are up to 100Mbit/s.

mciantyre avatar Dec 14 '23 16:12 mciantyre