Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Introduction

This document describes the integration of the delivered EtherCAT example projects for Infineon XMC4800 target with the development environment DAVE studio.

Target System

The port EtherCAT stack was implemented and tested on the Infineon Automation Board V2.

Toolchain

  • Compiler/IDE: DAVE studio v4.5.0 (or newer)

  • Flash tool/Debugger: Infineon XMC-Link Debug Probe (based on Segger J-Link)

Additionally, the driver package supports the target XMC4800 Relax EtherCAT-Kit V1:

General information

The XMC4800 is an ARM-Cortex M4 processor core with an On-Chip EtherCAT® slave controller. Both are connected via internal On-Chip memory interface.
The interrupt lines IRQ and SYNC0 of the EtherCAT® slave controller are internally connected with the
NVIC interrupt lines (IRQ → SR0, SYNC0 → ERU1) of the Infineon CPU.

The driver uses some modules of the XMC Peripheral Library provided by Infineon.
They are already included in the following delivered package folder:

  • drivers/xmc4800/Libraries

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

  • examples/xmc4800/

The package optionally 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

Please see the following folders for a working FreeRTOS implementation:

  • examples/xmc4800/s1_xmc4800_freertos

  • examples/xmc4800/s4_xmc4800_freertos

  • examples/xmc4800/s10_xmc4800_isr_freertos

  • examples/xmc4800/s10_xmc4800_isr_dc_freertos

These examples were created with FreeRTOS support. All other examples are bare metal projects.

The FreeRTOS sources are not part of the delivery.
Please download the sources from FreeRTOS (https://www.freertos.org/index.html).

Place the FreeRTOS sources in the following folder to build the examples:

<delivery-folder>
      |- drivers
      |- ethercat
      |- examples
      |- FreeRTOS
           |-Source

ICC tool project

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

Please install the ICC plugin for XMC4800 (delivery package: “0212_2503_dp_xmc4000_Vxx”). Use these settings also for your own custom projects.

Open IDE projects

  1. import the IDE project from the examples folder from within the DAVE studio IDE:

Now you can build both projects.

2. Open the “Debug Configuration” and create a new SEGGER GDB J-Link connection:

The correct debugger settings should be automatically generated by the tool.

Now you can download (Debug button) and test the project.

Available sample applications

There are examples for both Infineon target boards, “Relax EtherCAT-Kit V1” and “Automation Board V2”.
There are examples for bare metal as well as FreeRTOS environments.
The FreeRTOS examples have a “_freertos” suffix in the folder name and are only available for the Automation Board V2. The abbreviation "AutBoardV2" in the project folder name designates the Automation Board V2.
All others are for the Relax Kit.

  • s1_xmc4800:

    • SDO read and write

    • 2 RX-PDOs and 2 TX-PDOs

    • object dictionary containing objects of various data types

    • bare metal or FreeRTOS project version available

  • s3_xmc4800:

    • 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

  • s4_xmc4800:

    • 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

    • bare metal or FreeRTOS project version available

  • s5_xmc4800:

    • 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

  • s7_xmc4800:

    • 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

  • s9_xmc4800:

    • 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_xmc4800_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

    • bare metal or FreeRTOS project version available

  • s11_xmc4800_cia402

    • EtherCAT slave with CiA 402 profile example application

  • No labels