CANopenNode/CANopenNode
FreeCANopen protocol stack
About CANopenNode/CANopenNode
CANopenNode is a free and open source CANopen protocol stack written in ANSI C with an object-oriented design. It implements the internationally standardized CANopen higher-layer protocol (EN 50325-4, CiA301) for embedded control systems built on top of CAN. The stack runs on various microcontrollers, either as a standalone application or with a real-time operating system (RTOS). It features a complete CANopen Object Dictionary that organizes communication, device, and custom variables, accessible both from C code and over the CANopen network. Key capabilities include NMT slave and simple master, Heartbeat and Node Guarding error control, PDO with dynamic mapping and bitwise mapping, SDO server/client (expedited, segmented, block transfer), Emergency message producer/consumer, Sync producer/consumer for network-synchronized PDO transmission, Time-stamp producer/consumer with millisecond resolution, LSS for node-ID and bitrate setup (master/slave, fastscan), a CANopen gateway with CiA309-3 ASCII command interface, and CANopen Safety (EN 50325-5, CiA304). The stack is suitable for 16-bit microcontrollers and above, is multithreaded and real-time, includes a non-volatile storage option for Object Dictionary variables, supports power saving and bootloader for firmware updates, and has passed the CANopen Conformance Test Tool. It contains no device-specific drivers; those must be added separately for each target system, with an example provided that compiles on any system but does not connect to actual CAN hardware.
Key Features
Pros & Cons
- Free and open source (ANSI C, object-oriented)
- Runs on a wide range of microcontrollers, standalone or with RTOS
- Comprehensive protocol support: NMT, PDO, SDO, Emergency, Sync, Time-stamp, LSS, Safety, gateway
- Passed CANopen Conformance Test Tool for standards compliance
- Includes related projects (CANopenDemo) for tutorials and testing
- Active community with 2k stars and 800 forks on GitHub
- Does not include device-specific drivers; must be added separately for each target system
- Base example compiles on any system but does not connect to actual CAN hardware
- Requires knowledge of CANopen protocol and C programming for integration
- Documentation primarily via Doxygen and GitHub wiki, may lack beginner-friendly tutorials