CANopenNode
CANopen protocol stack
Loading...
Searching...
No Matches
NMT control bitfield for NMT internal state.
+ Collaboration diagram for NMT control bitfield for NMT internal state.:

Macros

#define CO_NMT_ERR_REG_MASK   0x00FFU
 First 8 bits can be used to specify bitmask for the CANopen Error register to get relevant bits for the calculation.
 
#define CO_NMT_STARTUP_TO_OPERATIONAL   0x0100U
 If bit is set then device enters NMT operational state after the initialization phase otherwise it enters NMT pre-operational state.
 
#define CO_NMT_ERR_ON_BUSOFF_HB   0x1000U
 If bit is set and device is operational it enters NMT pre-operational or stopped state if CAN bus is off or heartbeat consumer timeout is detected.
 
#define CO_NMT_ERR_ON_ERR_REG   0x2000U
 If bit is set and device is operational it enters NMT pre-operational or stopped state if masked CANopen error register is different than zero.
 
#define CO_NMT_ERR_TO_STOPPED   0x4000U
 If bit is set and CO_NMT_ERR_ON_xx condition is met then device will enter NMT stopped state otherwise it will enter NMT pre-op state.
 
#define CO_NMT_ERR_FREE_TO_OPERATIONAL   0x8000U
 If bit is set and device is pre-operational it enters NMT operational state automatically if conditions from CO_NMT_ERR_ON_xx are all false.
 

Detailed Description

Variable of this type is passed to CO_NMT_init() function. It controls behavior of the CO_NMT_internalState_t of the device according to CANopen error register.

Internal NMT state is controlled also with external NMT command, CO_NMT_sendInternalCommand() or CO_NMT_sendCommand() functions.