cp3cn23 National Semiconductor Corporation, cp3cn23 Datasheet - Page 112

no-image

cp3cn23

Manufacturer Part Number
cp3cn23
Description
Cp3cn23 Reprogrammable Connectivity Processor With Dual Can Interfaces
Manufacturer
National Semiconductor Corporation
Datasheet
www.national.com
17.10.15 CAN Error Counter Register (CANECn)
The CANECn register reports the values of the CAN Re-
ceive Error Counter and the CAN Transmit Error Counter.
REC
TEC
17.10.16 CAN Error Diagnostic Register (CEDIAGn)
The CEDIAGn register reports information about the last
detected error. The CAN module identifies the field within
the CAN frame format in which the error occurred, and it
identifies the bit number of the erroneous bit within the
frame field. The CPU bus master has read-only access to
this register, and all bits are cleared on reset.
EFID
Res. DRIVE MON CRC STUFF TXE EBID
15
15
14
REC
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.
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 53.
13
EFID3:0
Table 53 Error Field Identifier
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
12
8
R
R
0
0
11
7
TRANSMISSION
INTERMISSION
ERROR ECHO
ARBITRATION
ARBITRATION
ERROR DEL
10
EXTENDED
SUSPEND
BUS IDLE
ERROR
R1/R0
Field
ACK
EOF
SOF
TEC
IDE
9
4 3
EFID
0
0
112
EBID
TXE
STUFF
CRC
MON
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 45
shows an example on how the EBID is calcu-
lated.
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
1 – The CAN module was an active transmit-
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
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.
Figure 45. EBID Example
time the error occurred.
ter at the time the error occurred.
time the error occurred.
EFID3:0
Table 53 Error Field Identifier
1101
1110
1111
r
r
Data Field
r
r
Field
DATA
Incorrect
r
CRC
DLC
Bit
r
DS047

Related parts for cp3cn23