AT32F425
Series Reference Manual
2022.03.30
Page 329
Ver 2.01
19.6.7 Error management
The status of CAN nodes is indicated by the receive error counter (TEC) and transmit error counter
(REC) bits in the CAN_ESTS register. In the meantime, the ETR[6: 4] bit in the CAN_ESTS register is
used to record the last error source, and the corresponding interrupts will be generated when the
CAN_INTEN register is enabled.
Error active flag: When both TEC and REC are lower than 128, the system is in the error active
state. An error active flag is set when an error is detected.
Error passive flag: When either TEC or REC is greater than 127, the system is in the error passive
state. An error passive flag is set when an error is detected.
Bus-off state: The bus-off state is entered when TEC is greater than 255. In this state, it is impossible
to transmit and receive messages. The CAN recovers from bus-off state in two ways: when
AEBOEN=0, in communication mode, once 128 times of 11 consecutive recessive bits have been
detected on the CAN RX, the software request enters freeze mode, and the bus-off state is left. When
AEBOEN=1, in communication mode, once 128 times of consecutive recessive bits have been
detected on the CAN RX, the CAN recovers automatically from the bus-off state.
19.7
CAN registers
These peripheral registers must be accessed by words (32 bits).
Table 19-1 CAN register map and reset values
Register name
Offset
Reset value
MCTRL
000h
0x0001 0002
MSTS
004h
0x0000 0C02
TSTS
008h
0x1C00 0000
RF0
00Ch
0x0000 0000
FR1
010h
0x0000 0000
INTEN
014h
0x0000 0000
ESTS
018h
0x0000 0000
BTMG
01Ch
0x0123 0000
Reserved
020h~17Fh
xx
TMI0
180h
0xXXXX XXXX
TMC0
184h
0xXXXX XXXX
TMDTL0
188h
0xXXXX XXXX
TMDTH0
18Ch
0xXXXX XXXX
TMI1
190h
0xXXXX XXXX
TMC1
194h
0xXXXX XXXX
TMDTL1
198h
0xXXXX XXXX
TMDTH1
19Ch
0xXXXX XXXX
TMI2
1A0h
0xXXXX XXXX
TMC2
1A4h
0xXXXX XXXX
TMDTL2
1A8h
0xXXXX XXXX
TMDTH2
1ACh
0xXXXX XXXX
RFI0
1B0h
0xXXXX XXXX
RFC0
1B4h
0xXXXX XXXX
RFDTL0
1B8h
0xXXXX XXXX