This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x + EtherCAT + Linux

Other Parts Discussed in Thread: TLK110

Hi,

I would like some clarification as to how an EtherCAT slave can be implemented on a AM335x.

I understand that the on-board PRU's are used to perform the 'real-time' EtherCAT packet processing.  How much EtherCAT related processing is performed on the Cortex A8 processor?  Is there any real-time requirements for the operating system running on the A8?

So far I have only found EtherCAT solutions using SYS/BIOS on the A8, would it be possible to implement an EtherCAT slave running regular Linux (non-RT) on the A8?

Kind Regards

Mark Norman

  • Mark,

    Yes, the PRUs perform the real-time part of packet processing. This is mostly at MAC (Layer 2) layer. On Cortex-A8, the EtherCAT slave stack is run along with any application level code.

    The real-time requirement for OS on A8 depends upon the end-application's response time requirements.For many applications, the process data interface (between PRU and ARM) is below 100us.

    We use SYS/BIOS to keep the code size small, to have real-time performance, to keep development process simple, and to keep end-system cost low. A Linux based system will require larger Flash for firmware, large DRAM for run-time memory requirements and even after that, the interrupt latency performance will be no match for what SYS/BIOS or other real-time OS achieves.

    Thanks,

    Maneesh

  • Hi Maneesh,

    Thank you for your response.

    I am not sure if you are familiar with the Beckhoff ET1100 EtherCAT slave IC.  If so, is the processing performed by the PRU's equivalent to that done by the ET1100? or is the ET1100 functionality split between the PRU's and the A8?

    Also, can a PRU connected EtherCAT port act as an EtherCAT master or can this only be done from a MII port connected to the A8?

    Kind Regards

    Mark

  • Yes, we are familiar with ET1100. The functionality provided by the PRU firmware is equivalent to that of this ASIC. And what is done by the ARM is equivalent to what an attached micro-controller/micro-processor to ET1100 will do.

    For EtherCAT master, it is not necessary to do anything on PRU. It is possible to directly run EtherCAT master over the MII ports available on an integrated Ethernet switch on AM335x. In this case, the ARM Cortex A8 would run EtherCAT master software and very likely, a software based PLC run-time environment.

    Thanks,

    Maneesh

  • Maneesh,

    Thanks again for your response.

    So is the interconnect between the A8 and the PRU's similar to the PDI on the ET1100?  If so, then I assume that EtherCAT protocol functionality will not be compromised if the A8 OS is not real-time?  I accept that a non-RT OS may not respond as promptly to EtherCAT commands as a RT OS but I am just trying to determine if it will have an impact on the core EtherCAT functionality (we don't have strict real-time requirements).

    Regarding the Master Port, we were hoping to use the same PCB for both Master and Slave devices with the only change the software.  Would this be possible using a PRU EtherCAT port? (ie could it be used as a Master?)

    Kind Regards

    Mark

  • Mark,

    We have the on-chip 200MHz bus fabric connecting the ARM to the PRUs. So, on a throughput level, it is way faster than solutions that do EtherCAT separate from the microprocessor/micro-controller.

    If you do plan to use a Linux type OS, and do not have strict real-time requirements, it will not be an issue.

    To re-use same design for master/slave, it is possible in theory. But PRU firmware will have to change such that in master mode, it acts as a ordinary Ethernet MAC. That is possible but we do not have a formal release/project plan for such functionality on the PRU. We do have many requests for this ... so it might happen... but I cannot say if or when. 

    In case your EtherCAT master does not require support for redundant links, then you would only need on Ethernet port for master. And if you use TLK110 (Ethernet PHY chip) that support RMII as well as MII, then what you could potentially do is connect the PRU0 MII ports to this PHY and also connect RMII1 ports to this PHY. That way, you can switch from PRU MII to gigabit switch MII ports internally but outside, it is still the same Ethernet PHY and same RJ45 connector. Your PCB would stay same but the software will be different. I hope that helps...

    Thanks.

    Maneesh