SSZT695 june   2018 TMS320F28379D


  1.   1
  2.   2
    1.     3
    2.     Step 1: Evaluate the C2000 EtherCAT Node (Stack and Hardware)
    3.     Step 2: Validate Your EtherCAT Hardware
    4.     Step 3: Create Your Own EtherCAT Slave-node Solution
    5.     Additional Resources

Brian Fortman

In part 1 of this blog series, I gave an overview of the market opportunity for EtherCAT® slave stack support on C2000™ microcontrollers (MCUs) and an introduction to a three-phased solution to jump-start slave stack development. In part 2, I outlined what is different and compelling about the TI C2000 MCU EtherCAT implementation. In this installment, I’ll break down the three phases of the development of your own slave-node application and how the TI EtherCAT package in C2000 controlSUITE™ software supports each phase.

Given the previously outlined complementary aspects of EtherCAT technology and C2000 MCUs for motion control applications – and because of customer requests – TI applied its embedded software development experience and C2000 MCU architecture knowledge to create a set of software solutions designed to aid in the development of EtherCAT slave nodes on C2000 real-time control MCUs. The software package will help you:

  • Evaluate the stack for a slave node.
  • Validate the correct operation/hookup of your custom hardware.
  • Create a complete slave-node application using your hardware and a stack distributed by the EtherCAT Technology Group.

Step 1: Evaluate the C2000 EtherCAT Node (Stack and Hardware)

The first software solution included in the C2000 EtherCAT support is meant to make it easy to quickly get familiar with the basic solution. Leveraging the TwinCAT PC software for the EtherCAT master node, the simple “echoback” example application and you can build a multinode EtherCAT network on your bench in minutes.

The EtherCAT “slave demo” project is a binary image release for the EtherCAT controlCARD, optimized for the C28x CPU, that includes the slave stack binary version. So all you need to do is program the C2000 MCU and connect a CAT5 cable to the EtherCAT master.

GUID-3F44B06F-2014-49E9-8523-5F832446E7C9-low.png Figure 1 C2000 MCU Out-of-the-box EtherCAT Slave Demonstration and Evaluation Solution

This evaluation project will help you answer questions like: What is the transfer latency from the external EtherCAT controller (ET1100) to the C2000 MCU? How much central processing unit (CPU) bandwidth does this solution take? What is the memory footprint of the hardware abstraction layer (HAL) and the slave stack?

After downloading the latest controlSUITE software, you can install the demonstration and evaluation example by executing the setup file, “EtherCAT_Slave_Demo_Code_v01_00_00_00_setup,” in the controlSUITE development kit project.

Step 2: Validate Your EtherCAT Hardware

The second software solution shifts from being based on the TI controlCARD tool to helping you develop your own hardware. The EtherCAT community refers to the interface to the programmable controller as the processor data interface (PDI). Recall that you can find reference hardware designs for both the parallel PDI, “ASYNC16” (C2000 MCU external memory interface [EMIF]) and serial PDI (C2000 MCU serial peripheral interface [SPI]). This software project will help you verify that hardware interfaces you have built “from the MCU to the wire” are correct.

Since the hardware abstraction layer (HAL) test application can communicate with a TwinCAT master node, the software project helps you validate that the physical PDI interfaces (EMIF and SPI port) to the EtherCAT controller (such as the ET1100) – as well as the physical layer (PHY) connections and Ethernet magnetics – are all connected properly.

You do not need an EtherCAT slave stack to validate the hardware connection in this case. Unlike step 1, the HAL test project is available as source code to aid in validation or to adapt C2000 MCUs to other physical interfaces for EtherCAT controllers.

GUID-F0F03624-0539-4792-A2DF-C160AA9A5C7E-low.png Figure 2 C2000 MCU HAL Test Application

Step 3: Create Your Own EtherCAT Slave-node Solution

Finally, the EtherCAT application reference project provides a step-by-step example when it’s time to integrate your validated hardware with the EtherCAT stack. This project contains the source code necessary to build an example EtherCAT slave node (initialization, HAL, echoback application) except for the EtherCAT slave stack itself. You must obtain the slave stack through the EtherCAT Technology Group; it is distributed as part of the slave stack configuration (SSC) tool.

GUID-3C59ECF7-B5D8-48F4-A080-27428EA0E92D-low.png Figure 3 C2000 MCU Native EtherCAT Slave Stack Reference Development Framework

In the event that your version of the configuration tool does not include support for C2000 MCUs, the controlSUITE project includes a patch that will make C2000 MCUs (and the ASYNC16 and SPI PDI options) available to you in the drop-down processor selection dialog box.

Two project configurations are available:

  • A random access memory (RAM)-based project, which is usually helpful during the initial stages of a project when code changes are frequent (less time spent programming flash).
  • A flash-based project, when the code is more mature and ready for testing through power-cycling of the target C2000 MCU.

With the release of the EtherCAT Slave and C2000 Delfino™ MCU controlCARD kit and EtherCAT solution reference in controlSUITE, software you can jump-start the development of an EtherCAT slave stack running directly on C2000 MCUs.

Additional Resources