CANopenSTM32 includes demo program with CANopenNode on STM32.
It is based on CANopenNode, which is free and open source CANopen Stack and is included as a git submodule.
CANopen is the internationally standardized (EN 50325-4) (CiA301) CAN-based higher-layer protocol for embedded control system. For more information on CANopen see http://www.can-cia.org/
This project created by STM32CubeIDE, Lib/CANopenNode/example
and Lib/CANopenNode/storage
folder should be ignored by STM32CubeIDE, and all modified driver and storage source are in Lib/driver
floder.
Electronic schema is in Assets
floder.
Object dictionary project file and EDS file are in Assets
folder, you should use latest libedssharp to open them.
Project use a onboard button as digital input for TPDO; TPDO transmission type is 0x01, which means transmiting is synchronous after every SYNC object.
Project use four onboard LEDs as digital output for RPDO;
Fetch source
git clone https://github.com/Jexbat/CANopenSTM32-HAL.git
git submodule update --init --recursive
Open STM32CubeIDE
File
->Open Projects From File System...
;
Click Directory
,select project folder then click finish
;
Now you can build project and download to your board.