Skip to content

rtlabs-com/mtb-example-soem

Repository files navigation

SOEM Industrial Ethernet Connectivity Example

This example demonstrates how to enable Industrial Ethernet connectivity using the SOEM (Simple Open EtherCAT Master) middleware on the Infineon XMC7200 Evaluation Kit (KIT_XMC72_EVK).

About SOEM

This example leverages the SOEM Middleware, an open-source, lightweight, and portable EtherCAT master stack implementation designed for embedded systems. It supports real-time communication and provides flexibility for integrating Industrial Ethernet applications.

Features

  • Demonstrates EtherCAT master stack integration on the KIT_XMC72_EVK.
  • Uses SOEM middleware to manage EtherCAT communications.
  • Provides reference examples for evaluation and testing.

Sample applications

Application Purpose CLI Command Primary Use Case
simple_ng Latency measurement simpleng Measure EtherCAT round-trip times
slaveinfo Diagnostics & discovery slaveinfo Inspect slaves, PDOs, and SDOs
xmc48_led_demo LED animation demo towards XMC48 slave xmc48demo Test EtherCAT outputs & LED control

Important: The runtime of the SOEM stack library is limited to 2 hours in the evaluation version.
To obtain the full version, please contact your regional sales representative at Infineon Technologies AG.


License

Refer to the license information provided in the SOEM middleware repository.
Ensure compliance with all licensing terms before deployment.


Getting started

Building and program application using Modus Toolbox

  1. Launch ModusToolbox™ v3.4 or later.
  2. Go to File → New Application.
  3. Select KIT_XMC72_EVK as the target board.
  4. Under Getting Started → Industrial Communication, choose EtherCAT Master Stack.
  5. Click Finish to create the project.
  6. Build the project by selecting Project → Build.
  7. Program the application:
    • In the Quick Panel, select
      EtherCAT_master_stack Program (KitProg3_MiniProg4) as the launch target.

Command Line Interface

The Command Line Interface (CLI) is available on the EVK USB serial interface. It is used to configure the active protocol and also to watch and set the current status of the I/O data. It is also possible to store the active protocol to nonvolatile memory which is useful for demos and testing.

Default UART setting :
    - 115200 baud
    - 8 bits
    - No parity
    - 1 stop bit

A list of supported commands are displayed using the help command:

----------------------------------------------------------------------
 SOEM Demo
 Configure communication protocol using this shell. Usage:
  'help'       - list of available commands
  'help <cmd>' - detailed help
  'about'      - for information on this application

 Built : Aug 21 2025 at 13:48:18
 Version 2.0.0+release-v0.6.0
----------------------------------------------------------------------

> Please start sample app from command prompt
>

> help
format_fs            - format the filesystem
help                 - show help
reboot               - reboot the device
simpleng             - measure roundtrip time for slaves
slaveinfo            - slave info
xmc48demo            - run xmc48 LED demo
show_heap            - dump heap usage
>

Requirements

  • ModusToolbox™ v3.4 or later (tested with v3.4)
  • Board support package (BSP) minimum required version for :
    • KIT_XMC72_EVK: v1.0.0
  • Programming language: C

Supported toolchains (make variable 'TOOLCHAIN')

  • GNU Arm® Embedded Compiler v11.3.1 (GCC_ARM) - Default value of TOOLCHAIN

Supported kits (make variable 'TARGET')

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published