Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This chapter contains the description of all error codes.

Error Code

The error code indicates, that ...

CAN_ERR_NONE

no error is detected.

CAN_ERR_NULLPTR

a parameter pointer is NULL

CAN_ERR_BUSID

the bus identifier is out of range

CAN_ERR_FRMSIZE

the buffer size (CAN frame size) is invalid

CAN_ERR_OPEN

the driver indicates, that the CAN bus can’t be opened

CAN_ERR_ENABLE

the CAN bus can’t be enabled

CAN_ERR_IOCTRLFUNC

the I/O function code is out of range

CAN_ERR_NULLMSG

the given message identifier is not found

CAN_ERR_MSGID

the message identifier is out of range

CAN_ERR_MSGUNUSED

unused signals are linked to the message

CAN_ERR_MSGCREATE

the message can’t be created

CAN_ERR_SIGID

the signal identifier is out of range

CAN_ERR_NULLSIGCFG

the signal is not configured

CAN_ERR_CANSIZE

the given signal size is invalid, e.g. is not 1, 2 or 4

CAN_ERR_SIGCREATE

the signal can’t be created

CAN_ERR_FRMWIDTH

the given frame width is not 1, 2 or 4

CAN_ERR_OSFREE

the CAN frame can’t be released to the memory pool

CAN_ERR_OSQUEUE

the CAN frame can’t be set into the RX or TX queue

CAN_ERR_OSALLOC

the CAN frame can’t be allocated from the memory pool

CAN_ERR_OSSEM

the CAN semaphore(s) can’t be created

CAN_ERR_OSQPEND

the CAN RX queue is empty and timeout error is detected

CAN_ERR_NOFRM

the CAN RX queue is empty

CAN_ERR_OSSEMPEND

the CAN semaphore pending timeout error is detected

CAN_ERR_OSSEMPOST

the CAN semaphore posting timeout error is detected

CAN_ERR_OSQACCEPT

the CAN TX queue is empty

Note: the global variable “CPU_INT16S can_errnum” holds the last detected error code.

4 Hardware Abstraction

The driver layer abstracts the different CAN controllers from the common usable CAN library. This chapter describes the interface of the low level device driver functions.

There are some parameters in function declarations, which are stated to be as ‘unused’. This is done to get a common device driver interface (even beside the CAN device), similar to the Posix driver interface.

  • No labels