Register 2: CAN Status (CANSTS), offset 0x004
Important:
This register is read-sensitive. See the register description for details.
The status register contains information for interrupt servicing such as Bus-Off, error count threshold,
and error types.
The
LEC
field holds the code that indicates the type of the last error to occur on the CAN bus. This
field is cleared when a message has been transferred (reception or transmission) without error. The
unused error code 0x7 may be written by the CPU to manually set this field to an invalid error so
that it can be checked for a change later.
An error interrupt is generated by the
BOFF
and
EWARN
bits, and a status interrupt is generated by
the
RXOK
,
TXOK
, and
LEC
bits, if the corresponding enable bits in the
CAN Control (CANCTL)
register are set. A change of the
EPASS
bit or a write to the
RXOK
,
TXOK
, or
LEC
bits does not
generate an interrupt.
Reading the
CAN Status (CANSTS)
register clears the
CAN Interrupt (CANINT)
register, if it is
pending.
CAN Status (CANSTS)
CAN0 base: 0x4004.0000
CAN1 base: 0x4004.1000
Offset 0x004
Type RW, reset 0x0000.0000
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
reserved
RO
RO
RO
RO
RO
RO
RO
RO
RO
RO
RO
RO
RO
RO
RO
RO
Type
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Reset
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
LEC
TXOK
RXOK
EPASS
EWARN
BOFF
reserved
RW
RW
RW
RW
RW
RO
RO
RO
RO
RO
RO
RO
RO
RO
RO
RO
Type
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Reset
Description
Reset
Type
Name
Bit/Field
Software should not rely on the value of a reserved bit. To provide
compatibility with future products, the value of a reserved bit should be
preserved across a read-modify-write operation.
0x0000.00
RO
reserved
31:8
Bus-Off Status
Description
Value
The CAN controller is not in bus-off state.
0
The CAN controller is in bus-off state.
1
0
RO
BOFF
7
Warning Status
Description
Value
Both error counters are below the error warning limit of
96.
0
At least one of the error counters has reached the error
warning limit of 96.
1
0
RO
EWARN
6
June 18, 2014
1380
Texas Instruments-Production Data
Controller Area Network (CAN) Module