60
9.6.6 CAN_Status
CAN_Status(Handle)
Function:
Checks the status bits for more specific details when an error occurs.
Parameters:
• Handle
o Type: Integer
o The handle of the CAN channel whose status bits are to be inquired.
o Format: A numeric value provided by the return value of CAN_Open
o Example: 2508
• Return value:
o Type: Integer
o Code indicating result of CAN_Status.
o Result:
Bit [2, 1, 0]
• 0, 0, 0: no error
• 0, 0, 1: stuff error
• 0, 1, 0: form error
• 0, 1, 1: ACK error
• 1, 0, 0: Bit1Error
• 1, 0, 1: Bit0Error
• 1, 1, 0: CRCError
• 1, 1, 1: unused
Bit [3]
• 1: message successfully transmitted
• 0: no message has been transmitted
Bit [4]
• 1: message successfully received
• 0: no message has been received
Bit [5]
• 1: CAN core is in error passive state
• 0: CAN core is in error active state
Bit [6]
• 1: at least one error counter in EML has reached the warning
limit of 96
• 0: both error counters are below the warning limit of 96
Bit [7]
• 1: CAN module is in bus-off state
• 0: CAN module is not in bus-off state
<BELL> = ERROR