Using ENET driver with freeRTOS

cancel
Showing results for 
Search instead for 
Did you mean: 

Using ENET driver with freeRTOS

901 Views
johnvanmaanen
Contributor I

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?

 

Kind regards,

 

John 

Labels (1)
0 Kudos
3 Replies

884 Views
mjbcswitzerland
Specialist V

Hi

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
Networking https://www.utasker.com/docs/uTasker/uTaskerNetworking.pdf

General documents: https://www.utasker.com/docs/documentation.html

Videos: https://www.youtube.com/watch?v=GXztWg9m6_8&list=PLWKlVb_MqDQEOCnsNOJO8gd3jDCwiyKKe

https://www.youtube.com/watch?v=kWNlsAoMly4&list=PLWKlVb_MqDQFZAulrUywU30v869JBYi9Q

http://youtu.be/BMPXhtoUeJo

http://www.youtube.com/watch?v=sZOCFLDfGTk

Regards

Mark
[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

0 Kudos

867 Views
johnvanmaanen
Contributor I

Hello Mark,

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?

Kind regards,

John

0 Kudos

857 Views
mjbcswitzerland
Specialist V

John

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".

Regards

Mark

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.

 

0 Kudos