Real-time control meets real-time industrial communications development – part 3

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 the EtherCAT Slave and C2000 Delfino MCU controlCARD kit, 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 – a TwinCAT PC/PLC in this case.

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]) in the EtherCAT Interface for High Performance MCU Reference Design. 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 (see Figure 2) 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.

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.

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. See the “EtherCAT Solution Reference Guide” for more information on how to use the SSC patch code.

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.

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.