Error Frames can be received if:
- the hardware represented by the connected PCAN-Channel supports error frames generation,
- the connected PCAN-Channel configured the parameter PCAN_ALLOW_ERROR_FRAMES using the function CAN_SetValue (class-method: SetValue) to activate the error frames.
The error frame data will be placed into a TPCANMsg or TPCANMsgFD structure, according to the kind of initialization used, and its MSGTYPE field will have the PCAN_MESSAGE_ERRFRAME bit set.
The following list shows the elements of an error frame:
Field |
Information from... |
Contents |
ID |
ECC register SJA1000 (Error Code Capture), bits 6 and 7 (ERRC0, ERRC1) |
0: The message only transports updated Error Counter values 1: Bit error 2: Form error 4: Stuff error 8: Other type of error |
DATA [0] |
ECC register, bit 5 (DIR) |
0: Error has occured during transmission 1: Error has occured during reception |
DATA [1] |
ECC register, bits 0 to 4 (SEG0 to SEG4) |
Current position of the bit stream processor: 2: ID.28 to ID.21 3: Start of frame 4: Bit SRTR 5: Bit IDE 6: ID.20 to ID.18 7: ID.17 to ID.13 8: CRC Sequence 9: Reserved Bit 0 10: Data Field 11: Data Length Code 12: Bit RTR 13: Reserved Bit 1 14: ID.4 to ID.0 15: ID.12 to ID.5 17: Active Error Flag 18: Intermission 19: Tolerate Dominant Bits 23: Error Delimiter 24: CRC Delimiter 25: Acknowledge Slot 26: End of Frame 27: Acknowledge Limiter 28: Overload Flag |
DATA [2] |
RX Error Counter Register (RXERR) |
Current value of the Receive Error counter |
DATA [3] |
TX Error Counter Register (TXERR) |
Current value of the Transmit Error counter |
For further information about this, see Philips Data Sheet "SJA1000 Stand-alone CAN controller".
Copyright © 2017. PEAK-System Technik GmbH. All rights reserved.
|
Send feedback to this documentation
|