CANopenNode
CANopen protocol stack
Loading...
Searching...
No Matches
Error status bits
+ Collaboration diagram for Error status bits:

Macros

#define CO_EM_NO_ERROR   0x00U
 0x00 Error Reset or No Error
 
#define CO_EM_CAN_BUS_WARNING   0x01U
 0x01 communication info CAN bus warning limit reached
 
#define CO_EM_RXMSG_WRONG_LENGTH   0x02U
 0x02 communication info Wrong data length of the received CAN message
 
#define CO_EM_RXMSG_OVERFLOW   0x03U
 0x03 communication info Previous received CAN message wasn't processed
 
#define CO_EM_RPDO_WRONG_LENGTH   0x04U
 0x04 communication info Wrong data length of received PDO
 
#define CO_EM_RPDO_OVERFLOW   0x05U
 0x05 communication info Previous received PDO wasn't processed yet
 
#define CO_EM_CAN_RX_BUS_PASSIVE   0x06U
 0x06 communication info CAN receive bus is passive
 
#define CO_EM_CAN_TX_BUS_PASSIVE   0x07U
 0x07 communication info CAN transmit bus is passive
 
#define CO_EM_NMT_WRONG_COMMAND   0x08U
 0x08 communication info Wrong NMT command received
 
#define CO_EM_TIME_TIMEOUT   0x09U
 0x09 communication info TIME message timeout
 
#define CO_EM_0A_unused   0x0AU
 0x0A communication info (unused)
 
#define CO_EM_0B_unused   0x0BU
 0x0B communication info (unused)
 
#define CO_EM_0C_unused   0x0CU
 0x0C communication info (unused)
 
#define CO_EM_0D_unused   0x0DU
 0x0D communication info (unused)
 
#define CO_EM_0E_unused   0x0EU
 0x0E communication info (unused)
 
#define CO_EM_0F_unused   0x0FU
 0x0F communication info (unused)
 
#define CO_EM_10_unused   0x10U
 0x10 communication critical (unused)
 
#define CO_EM_11_unused   0x11U
 0x11 communication critical (unused)
 
#define CO_EM_CAN_TX_BUS_OFF   0x12U
 0x12 communication critical CAN transmit bus is off
 
#define CO_EM_CAN_RXB_OVERFLOW   0x13U
 0x13 communication critical CAN module receive buffer overflowed
 
#define CO_EM_CAN_TX_OVERFLOW   0x14U
 0x14 communication critical CAN transmit buffer overflowed
 
#define CO_EM_TPDO_OUTSIDE_WINDOW   0x15U
 0x15 communication critical TPDO is outside SYNC window
 
#define CO_EM_16_unused   0x16U
 0x16 communication critical (unused)
 
#define CO_EM_RPDO_TIME_OUT   0x17U
 0x17 communication critical RPDO message timeout
 
#define CO_EM_SYNC_TIME_OUT   0x18U
 0x18 communication critical SYNC message timeout
 
#define CO_EM_SYNC_LENGTH   0x19U
 0x19 communication critical Unexpected SYNC data length
 
#define CO_EM_PDO_WRONG_MAPPING   0x1AU
 0x1A communication critical Error with PDO mapping
 
#define CO_EM_HEARTBEAT_CONSUMER   0x1BU
 0x1B communication critical Heartbeat consumer timeout
 
#define CO_EM_HB_CONSUMER_REMOTE_RESET   0x1CU
 0x1C comm.
 
#define CO_EM_SRDO_CONFIGURATION   0x1DU
 0x1D communication critical Error in SRDO configuration parameters
 
#define CO_EM_1E_unused   0x1EU
 0x1E communication critical (unused)
 
#define CO_EM_1F_unused   0x1FU
 0x1F communication critical (unused)
 
#define CO_EM_EMERGENCY_BUFFER_FULL   0x20U
 0x20 generic info Emergency buffer is full or message wasn't sent
 
#define CO_EM_21_unused   0x21U
 0x21 generic info (unused)
 
#define CO_EM_MICROCONTROLLER_RESET   0x22U
 0x22 generic info Microcontroller has just started
 
#define CO_EM_23_unused   0x23U
 0x23 generic info (unused)
 
#define CO_EM_24_unused   0x24U
 0x24 generic info (unused)
 
#define CO_EM_25_unused   0x25U
 0x25 generic info (unused)
 
#define CO_EM_26_unused   0x26U
 0x26 generic info (unused)
 
#define CO_EM_NON_VOLATILE_AUTO_SAVE   0x27U
 0x27 generic info Automatic store to non-volatile memory failed
 
#define CO_EM_WRONG_ERROR_REPORT   0x28U
 0x28 generic critical Wrong parameters to CO_errorReport()
 
#define CO_EM_ISR_TIMER_OVERFLOW   0x29U
 0x29 generic critical Timer task has overflowed
 
#define CO_EM_MEMORY_ALLOCATION_ERROR   0x2AU
 0x2A generic critical Unable to allocate memory for objects
 
#define CO_EM_GENERIC_ERROR   0x2BU
 0x2B generic critical Generic error test usage
 
#define CO_EM_GENERIC_SOFTWARE_ERROR   0x2CU
 0x2C generic critical Software error
 
#define CO_EM_INCONSISTENT_OBJECT_DICT   0x2DU
 0x2D generic critical Object dict.
 
#define CO_EM_CALCULATION_OF_PARAMETERS   0x2EU
 0x2E generic critical Error in calculation of device parameters
 
#define CO_EM_NON_VOLATILE_MEMORY   0x2FU
 0x2F generic critical Error with access to non volatile memory
 
#define CO_EM_MANUFACTURER_START   0x30U
 0x30+ manufacturer info or critical Error status buts free to use by manufacturer.
 
#define CO_EM_MANUFACTURER_END   (CO_CONFIG_EM_ERR_STATUS_BITS_COUNT - 1U)
 (CO_CONFIG_EM_ERR_STATUS_BITS_COUNT - 1) largest value of the Error status bit.
 

Detailed Description

Bits for internal indication of the error condition. Each error condition is specified by unique index from 0x00 up to 0xFF.

If specific error occurs in the stack or in the application, CO_errorReport() sets specific bit in the errorStatusBit variable from CO_EM_t. If bit was already set, function returns without any action. Otherwise it prepares emergency message.

Maximum size (in bits) of the errorStatusBit variable is specified by CO_CONFIG_EM_ERR_STATUS_BITS_COUNT (set to 10*8 bits by default). Stack uses first 6 bytes. Additional 4 bytes are pre-defined for manufacturer or device specific error indications, by default.

Macro Definition Documentation

◆ CO_EM_HB_CONSUMER_REMOTE_RESET

#define CO_EM_HB_CONSUMER_REMOTE_RESET   0x1CU

0x1C comm.

critical Heartbeat consumer detected remote node reset

◆ CO_EM_INCONSISTENT_OBJECT_DICT

#define CO_EM_INCONSISTENT_OBJECT_DICT   0x2DU

0x2D generic critical Object dict.

does not match the software

◆ CO_EM_MANUFACTURER_START

#define CO_EM_MANUFACTURER_START   0x30U

0x30+ manufacturer info or critical Error status buts free to use by manufacturer.

By default bits 0x30..0x3F are set as informational and bits 0x40..0x4F are set as critical. Manufacturer critical bits sets the error register as specified by CO_CONFIG_ERR_CONDITION_MANUFACTURER