TI AM64x

Introduction

This document describes the integration of the delivered EtherCAT example projects for TI AM64x target with the development environment Code Composer Studio IDE.

Target System

The port EtherCAT stack was implemented and tested on the TI Board “TMDS64EVM”.

grafik-20240816-064027.png

Toolchain

  • Compiler/IDE: TI-Clang v3.2.0.LTS / Code Composer Studio v12.6

  • Flash tool/Debugger: on board TI emulator XDS110

General information

The AM64x is a multicore solution. The EtherCAT Stack runs on the ARM-Cortex-R5 core which is internally connected with a PRU EtherCAT controller emulation on this platform.

The driver uses some modules of the AM64x industrial SDK (v09.01.00) provided by TI.
The base driver sources for this platform are generated via TI SysConfig tool, if you build the projects.

The following image shows a screenshot of the configuration file “example.syscfg” opened in Code Composer Studio:

grafik-20240815-130805.png

On the right side you can see the graphical configuration interface. On the left side you can see the folder “Generated Source” that contains the generated driver source files.

Additionally, BSP sources from the SDK are included for initialization and control of the PRU ICSS:

  • drivers/am64x/ti_pru_bsp/

You can find port’s EtherCAT example projects in the following folder of the delivery package:

  • examples/am64x/

The directory 'ccs' contains a project for the Code Composer Studio. You can select the desired sample application by activating the corresponding “Build Configuration”:
”Project --> Build Configurations --> Set Active --> XXX”

The package supports a FreeRTOS implementation.
In order to activate this feature in the EtherCAT stack, the following project preprocessor defines are required:

  • EC_CONFIG_THREAD_SAFE

  • EC_CONFIG_USE_FREERTOS

The FreeRTOS sources are not part of the delivery.
FreeRTOS is included in the sample projects as a Library provided by the TI SDK.

Open IDE projects

  1. Import the CCS project from the example folder into the Code Composer Studio:

Now you can build the projects.

2. To launch the sample project, load the prepared target configuration (project file: AM64x.ccxml) and switch to the Debug view. In the next step, connect to a R5 CPU core and load the desired example binary.

Now you can run and test the example project.

ICC tool project

The sample projects are designed with port’s ICC tool. The HW configuration uses the AM64x CPU entry. Shown here for example s1:

Please install the ICC plugin for AM64x and use this setting also for your own customer projects.

Available sample applications

  • s01_am64x:

    • SDO read and write

    • 2 RX-PDOs and 2 TX-PDOs

    • object dictionary containing objects of various data types

  • s03_am64x:

    • SDO read and write

    • SDO Info service

    • SDO Info object names

    • 2 RX-PDOs and 2 TX-PDOs

    • Split SDO-Access

    • Split NMT-Control

    • object dictionary containing objects of various data types

  • s04_am64x:

    • SDO read and write

    • SDO Info service

    • SDO Info object names

    • 2 RX-PDOs and 2 TX-PDOs

    • Split SDO-Access

    • Split NMT-Control

    • object dictionary containing objects of various data types

    • EoE service with rudimentary ARP and IGMP support (ping)

    • FoE service

  • s05_am64x:

    • SDO read and write

    • SDO Info service

    • SDO Info object names

    • 2 RX-PDOs and 2 TX-PDOs

    • object dictionary containing objects of various data types

    • virtual objects

  • s07_am64x:

    • SDO read and write

    • SDO Info service

    • SDO Info object names

    • 2 RX-PDOs and 2 TX-PDOs

    • object dictionary containing objects of various data types

    • FoE mailbox service

    • BOOTSTRAP NMT mode

  • s09_am64x:

    • SDO read and write

    • 2 RX-PDOs and 2 TX-PDOs

    • object dictionary containing objects of various data types

    • dynamic PDO mapping with extension module usr_dynPdoMapping

  • s10_am64x_xxx:

    • Interrupt handling

    • xxx = isr: PDI Events are handled in an ISR

    • xxx = isr_dc: PDI Events and DC Events are handled in separate ISRs

  • s11_am64x_cia402

    • EtherCAT slave with CiA 402 profile example application