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.

TIDA-00299: Creating a EtherCAT to 50MHz SPI Bridge

Part Number: TIDA-00299
Other Parts Discussed in Thread: AMIC110

I am new to EtherCAT and assessing it for a potential application. In my current application, I am controlling a SPI device from a Host PC via an FTDI USB bridge device. Each burst of SPI writes is about 1.28kB (all control messages). My SPI device is capable of 50MHz SPI, but this speed is not possible with the FTDI USB device. Additionally, my application involves several nodes with one Host PC master. To minimize the latency between the Host PC and the SPI device, standard Ethernet is not sufficient. For these reasons, I am considering EtherCAT for the application. The diagram below shows the proposed system.

I see that the TMS320F2837xS has 3 SPI ports capable of 50MHz SPI communication. Is it possible to use this MCU to bridge the Host PC (EtherCAT Master) to the SPI device?

The application on the MCU would basically just translate and send the EtherCAT data to the SPI device. The data flow would be as follows:

  1. Host PC formats 10kB control data for SPI device as EtherCAT datagrams
  2. TIDM-000299 sends datagrams to MCU via SPI Port 1
  3. MCU forwards data to SPI device via SPI Port 2 at 50MHz

Looking at the design guide for TIDM-000299, I see two SPI rates listed in Table 3: 16MHz (Slave) and 48MHz (Master). In my proposed application, which rate applies?

  • Hello!

    Thank you for your interest in the TIDA-00299 reference design and the C2000 MCUs.

    With regards to your question on the SPI1 interface. In your diagram I see you setup the F2837xS SPI in Controller (master) mode, hence the AMIC110 SPI will be in Peripheral  (slave) mode running maximum at 16MHz SPI clock. The second SPI on the F2837xS in Controller mode can then send the data to the your SPI device, e.g. at 50MHz SPI clock.  

    Would it be an option to use a later C2000 MCU which incorporate an EtherCAT device controller? Please see the C2000Tm real-time MCU F28P65x LaunchPadTm development kit: includes a dual 100MB Ethernet PHYs too.  


    Martin Staebler

  • Martin,

    Thank you for bringing this device to my attention! With its dedicated EtherCAT controller, will the F28P65x be able to forward the data over SPI at 50MHz? More generally, what kind of bottleneck would that transfer introduce in terms of latency? Also, there was an error in my post: the SPI data size is 1.28kB.

    Looking at Beckhoff's documentation, I see that 100BASE-TX EtherCAT is capable of ~122us for 1.5kB of data. I also know that using a 50MHz SPI port, I am usually able to write the 1.28kB of data to the SPI Device in about 200us. This means that minimally, I am looking at 322us of latency. How much do you think the transfer from EtehrCAT to SPI on the MCU will add? Just a rough estimate (10s of us, 100s of us, etc.)

    Based on these numbers alone, it looks like standard ethernet is comparable for the latency requirement of my application (i.e. no real benefit from EtherCAT). However, it seems the network topology offered by EtherCAT my be beneficial assuming I have 2 or more Nodes.

  • Hi William,

    thank you for the info.

    I will need to ask our experts from the C2000 MCU product line and get back to you ASAP.

    Once the EtherCAT packet is received on the F28P65x, the transfer through SPI could be handled by the DMA controller with low overhead and latency.
    Let me get back to you with solid data through.. 

    Martin Staebler

  • Hi William,

    I apologize for the delay in this answer.

    Using a calculation like the one found below in our TRM for F28P65X, I think that the fastest transfer from EtehrCAT to SPI on the MCU would be ~10us:

    Best Regards,

    Ben Collier