English
Language : 

CP3BT26 Datasheet, PDF (139/278 Pages) National Semiconductor (TI) – Reprogrammable Connectivity Processor with Bluetooth-R, USB, and CAN Interfaces
19.10.15 CAN Error Counter Register (CANEC)
The CANEC register reports the values of the CAN Receive
Error Counter and the CAN Transmit Error Counter.
15
REC
8
7
0
R
TEC
0
EBID
REC
TEC
The CAN Receive Error Counter field reports
the value of the receive error counter.
The CAN Transmit Error Counter field reports
the value of the transmit error counter.
19.10.16 CAN Error Diagnostic Register (CEDIAG)
The CEDIAG register reports information about the last de-
tected error. The CAN module identifies the field within the
CAN frame format in which the error occurred, and it identi-
fies the bit number of the erroneous bit within the frame
field. The CPU bus master has read-only access to this reg-
ister, and all bits are cleared on reset.
15 14 13 12 11 10 9 4 3 0
Res. DRIVE MON CRC STUFF TXE EBID EFID
0
R
EFID
The Error Field Identifier field identifies the
frame field in which the last error occurred.
The encoding of the frame fields is shown in
Table 63.
Table 63 Error Field Identifier
TXE
EFID3:0
Field
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
ERROR
ERROR DEL
ERROR ECHO
BUS IDLE
ACK
EOF
INTERMISSION
SUSPEND
TRANSMISSION
SOF
ARBITRATION
IDE
EXTENDED
ARBITRATION
R1/R0
STUFF
CRC
MON
Table 63 Error Field Identifier
EFID3:0
1101
1110
1111
Field
DLC
DATA
CRC
The Error Bit Identifier field reports the bit po-
sition of the incorrect bit within the erroneous
frame field. The bit number starts with the val-
ue equal to the respective frame field length
minus one at the beginning of each field and
is decremented with each CAN bit. Figure 63
shows an example on how the EBID is calcu-
lated.
rrrrrr
Incorrect
Bit
Data Field
DS047
Figure 63. EBID Example
For example, assume the EFID field shows
1110b and the EBID field shows 111001b.
This means the faulty field was the data field.
To calculate the bit position of the error, the
DLC of the message needs to be known. For
example, for a DLC of 8 data bytes, the bit
counter starts with the value: (8 × 8) - 1 = 63;
so when EBID[5:0] = 111001b = 57, then the
bit number was 63 - 57 = 6.
The Transmit Error bit indicates whether the
CAN module was an active transmitter at the
time the error occurred.
0 – The CAN module was a receiver at the
time the error occurred.
1 – The CAN module was an active transmit-
ter at the time the error occurred.
The Stuff Error bit indicates whether the bit
stuffing rule was violated at the time the error
occurred. Note that certain bit fields do not
use bit stuffing and therefore this bit may be
ignored for those fields.
0 – No bit stuffing error.
1 – The bit stuffing rule was violated at the
time the error occurred.
The CRC Error bit indicates whether the CRC
is invalid. This bit should only be checked if
the EFID field shows the code of the ACK
field.
0 – No CRC error occurred.
1 – CRC error occurred.
The Monitor bit shows the bus value on the
CANRX pin as sampled by the CAN module at
the time of the error.
139
www.national.com