We want to use the RT1xxx for an industrial control system. This system will be an Ethercat master and also has a TCP/IP connection over a second Ethernet port. For the TCP/IP, we want to use lwip. For the Ethercat master we need to be able to send and receive raw Ethernet frames. How can we do this? Is it possible to use the ENET driver in combination with freeRTOS? Are there any other/better options? What are in general the limitations of using the drivers provided by NXP in combination with freeRTOS?
The Ethernet driver doesn't interact with FreeRTOS (i.e the operating system) in any way - it just interacts with the TCP/IP stack.
A couple of years ago FreeRTOS (now Amazon AWS) added their own +TCP stack because the were not happy with LWIP, which is included in the AWS package so if you need FreeRTOS their stack may be the one you should go for. I think that both use the FSL ENET drivers as standard.
Do you need two Ethernet interfaces (eg. i.MX RT 1062/1064) or just one (eg. i.MX RT 1021, 1024 or 1050)?
Don't miss out considering the uTasker project for these parts since it includes integrated TCP/IP and USB stacks with low foot print and very flexible networking (multi-homed, multiple Interface and multiple network support). It has been used in many industrial products on Freescale HC16, Coldfire, Kinetis and i.MX RT parts since 2003 so is mature. The TCP/IP services blend into the file systems (for web server and FTP etc.) since all are part of the same project (rather than being diverse middle-ware that needs to be bolted together each time). The i.MX RT parts (peripherals, interrupts, DMA) are emulated in approx. real-time so complete i.MX RT projects can be developed, tested and debugged on a PC in Visual Studio (where the emulated i.MX RT part is seen on the network as if it were a physical node) which makes all work and learning many times faster and simple than the traditional load and debug on HW methods - especially networking projects are much simpler like this. [Also has complete secure OTA firmware updating concept built in]
See tutorial https://www.utasker.com/docs/iMX/uTaskerV1.4_iMX.pdf
General documents: https://www.utasker.com/docs/documentation.html
[uTasker project developer for Kinetis and i.MX RT - incl. developer and supporter of integrated TCP/IP stack]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements
For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key: https://www.utasker.com/iMX/RT1020.html / https://www.utasker.com/iMX/RT1050.html / https://www.utasker.com/iMX/RT1060.html / https://www.utasker.com/iMX/RT1064.html
Thanks for your reply. As stated before, we need two Ethernet interfaces. One for TCP/IP and one for Ethercat. I think we can make the TCP/IP working, either with FreeRTOS or uTasking. To be honest, I don't see a big advantage in using uTasking, because for Ethercat we need to be able to send and receive raw Ethernet frames (no TCP/UPD/IP). Using uTasking will not make that any easier, will it? Can you explain why we should use uTasking?
Generally I think that uTasker makes Ethernet projects much easier and efficient since it allows immediate Ethernet/networking operation (since the Ethernet driver is integrated and can be easily used for networking with its integrated TCP/IP stack or for RAW frames, or for bridging between multiple interfaces (like Ethernet RNDIS over USB or WifI or G4 models and such)).
Allowing EtherCAT master firmware to run on a PC on a simulated i.MX RT part makes for simpler development, testing and debugging too (also when HW is not yet ready, which can give a project a big leap forward).
However I am wondering whether you already have HW that is capable of dual Ethernet since there are no NXP evaluation boards that support more than one (unless you wait for the i.MX RT 1170 EVK which should be released fairly shortly).
The uTasker dual-Ethernet driver/stack has been developed on custom HW and so will need to be proven on more when these become available - which will presumably be the same case for other driver sources since they probably don't support dual Ethernet use since it is not presently "standard".
P.S. Note that the uTasker project doesn't just give Ethernet and networking but also USB stack, file systems, graphical libraries and many industrial control solutions fully integrated into the same project/package. It also includes FreeRTOS mode. So Ethernet development should be much faster but then most other aspects of the overall product development will tend to be much quicker too so generally there are numerous advantages, all boiling down to quicker and cheaper project developments and shorter time to market.