FreeRTOS+TCP/IP port for NXP iMX.RT1064?

I was wondering if anyone has developed the required network drivers to run on the NXP iMX.RT1064 EVK. I am working on this now using the fsl_enet drivers from the SDK as a starting point along with the FreeRTOS docs for custom drivers but since I’m a bit rusty on the embedded coding and new to FreeRTOS I was hoping there may be someone else out there that has been down this road already. Any additional pointers or references are appreciated.

Thanks,

Dave

Hi Dave, I suppose that you already came across Porting FreeRTOS+TCP to a Different Microcontroller?

It is also good to have a look at existing drivers, like e.g. the one for STM32Fxx.

Please go step-by-step: start with a static IP-address and focus on receiving or sending a single packet. ARP Packets will be sent automatically every 20 seconds, once the stack is up.

The first thing however is to initialise the Ethernet PHY and get the Link Status high. You can use the generic phyHandling.c for this.

Hein,

Thanks for the feedback. I have been using the porting guide you referenced and will review the STM32Fxx code you mentioned along with the MCUXpresso drivers. I had a temporary setback from a glitch I experienced with MCUXpresso IDE but working my way through the driver development. I may follow up with a few more questions once I get further into this.

Thanks,

Dave

Hein,

I have made decent progress on porting the TCP drivers to the iMX.RT1064 EVK platform. I am outputting the gratuitous ARP broadcast every 30 seconds on the network. I then can run a ping loop on my connected PC (requests coming from PC) and get replies typically back in <1ms, a few take up to 15ms. ping can run for hours with no problem. I am moving on to implement the simple TCP echo server and uncovered some issues I am hoping you or others might have insight into.

I am using the MCUXpresso IDE with Linkserver debug link. I have found that if I pause the ping app (while not actively sending pings from PC) and then restart a few seconds later (and restart pings from PC) that the app will no longer reply to pings in a timely manner. Using Wireshark I see the ping requests go out and now the FreeRTOS app is taking a couple of seconds to send the reply. Nothing else in the Wireshark log looks unusual other than the slow reply from the FreeRTOS app. If I restart the target app and let it run without any pauses to the execution, everything is back to normal with <1ms ping replies. It seems that somehow the act of pausing execution is corrupting something in the RTOS and/or stack.

Perhaps related to this is when I do pause execution, the IDE is no longer FreeRTOS aware. I had set the debugger to all-stop and increased the FreeRTOS TAD memory read timeout to 20s. This had previously done the trick and allowed me to get task details on pause. Now with practically the same code it is not working (and I break the speedy ping replies).

Thanks for the help,

Dave