Xyntos | Logo

Overview  |  Quick Start  |  Samples  |  Architecture  |  CoSlave  |  CoMaster  |  Listeners  |  Object Dictionary  |  Configuration  |  Eds2Od


Samples

Ready-to-build sample projects live in the repository canoopendemo. They are complete, flashable devices — not code snippets — and they double as the reference for wiring your own device.

The sample matrix

Sample Role Profile Platform
CanOpenClient/CiA401/BareMetal Slave (I/O device, node 10) CiA 401 STM32, bare-metal main loop
CanOpenClient/CiA401/FreeRTOS Slave (I/O device, node 10) CiA 401 STM32, FreeRTOS tasks
CanOpenClient/CiA417/BareMetal Lift hall call panel (node 10) CiA 417 STM32, bare-metal main loop
CanOpenClient/CiA417/FreeRTOS Lift hall call panel (node 10) CiA 417 STM32, FreeRTOS tasks
CanOpenMaster/CiA401/FreeRTOS Master (NMT manager, node 1) CiA 401 STM32, FreeRTOS tasks
CanOpenMaster/CiA417/FreeRTOS Lift call controller 1 (node 1) CiA 417 STM32, FreeRTOS tasks

All samples target the low-cost ST NUCLEO-C092RC board (STM32C092RC, Cortex-M0+) with on-board ST-LINK debugger and CAN FD transceiver — two boards and two wires (CAN_H/CAN_L, 250 kbit/s) are a complete CANopen network. More platforms will follow.

What the buttons and leds do

Each master boots “its” slave per CiA 302-2 and then exchanges process data via PDO. The green led is always the CiA 303-3 run led; the blue led is configurable per the BLUE_LED_FUNCTION define in the device header — CiA 303-3 error indicator, or process data (the default):

  • CiA 401: the slave’s user button is digital input 6000h sub 01h, published via tpdo 1 — shown on the master’s blue led. The master’s user button drives the slave’s digital output 6200h sub 01h via rpdo 1 — shown on the slave’s blue led.
  • CiA 417: the panel’s user button registers a hall call up (virtual input mapping 6010h, call input group 6100h sub 01h) — shown on the call controller’s blue led. The call controller’s button answers with the call acknowledgement (virtual output mapping 6011h) — shown on the panel’s blue led. See the analyzer trace of this round trip.

Anatomy of a sample

Every sample follows the same layout:

  • Source/CanOpenDevice/ — the device class (derives CoSlave or CoMaster, implements the listener interfaces) and its object dictionary, generated from Eds/*.eds with Eds2Od.
  • Source/CANoopEn/Settings/ — the per-project copies of CoSettings.hpp and CoConfiguration.hpp (details).
  • Source/CANoopEn/System/ and Source/System/ — the system-layer port (bare-metal or FreeRTOS) and OS wrappers.
  • Source/Target/ — the board drivers (CAN, button, leds, UART debug output) behind minimal interfaces; porting to other hardware means swapping this folder.
  • VSCode/ — the CMSIS solution: open the folder in VS Code with the Arm CMSIS extension pack, build, flash, done. The Quick Start Guide walks through it.

The masters additionally keep a second object dictionary class: the image of the remote slave’s dictionary, also generated from the slave’s EDS file.

XYNTOS_Logo_mit_claim_weiss