2. CANOPEN

2.1. Overview

The canopen_demo provides the following features:

  • HeartBeat test

  • NMT test

  • SDO test

  • PDO test

  • SYNC test

2.2. Board Setting

Connect 2 boards

2.3. Running the example

When the example runs successfully, the board shows the following:

----------------------------------------------------------------------
$$\   $$\ $$$$$$$\  $$\      $$\ $$\
$$ |  $$ |$$  __$$\ $$$\    $$$ |\__|
$$ |  $$ |$$ |  $$ |$$$$\  $$$$ |$$\  $$$$$$$\  $$$$$$\   $$$$$$\
$$$$$$$$ |$$$$$$$  |$$\$$\$$ $$ |$$ |$$  _____|$$  __$$\ $$  __$$\
$$  __$$ |$$  ____/ $$ \$$$  $$ |$$ |$$ /      $$ |  \__|$$ /  $$ |
$$ |  $$ |$$ |      $$ |\$  /$$ |$$ |$$ |      $$ |      $$ |  $$ |
$$ |  $$ |$$ |      $$ | \_/ $$ |$$ |\$$$$$$$\ $$ |      \$$$$$$  |
\__|  \__|\__|      \__|     \__|\__| \_______|\__|       \______/
----------------------------------------------------------------------
*********************************************************************************
*                                                                               *
*                         CANOPEN Example Menu                                  *
*                                                                               *
* 0 - Master mode                                                               *
* 1 - Slave mode                                                                *
*                                                                               *
*********************************************************************************

2.3.1. Test steps

users connect two boards and run this demo, when two boards all show select menu, then one choose slave, another choose master.

Slave board show as:

rxSize = 11, txSize = 8
excessive number of concurrent CAN RX filters enabled (needs 11, 16 available)
enter slave mode ~ ~

Master board show as:

enter master mode and find slave device ~~
rxSize = 11, txSize = 8
excessive number of concurrent CAN RX filters enabled (needs 11, 16 available)
find device, id:70a, status preoptional
slave enter to optional mode
PDO test successfully!
slave HBtime: 1000 ms
slave HBtime: 2000 ms
SDO test successfully!
canopen test done