![ARTERY AT32WB415 Series Reference Manual Download Page 275](http://html1.mh-extra.com/html/artery/at32wb415-series/at32wb415-series_reference-manual_2977599275.webp)
AT32WB415
Series Reference Manual
2022.04.13
Page 275
Ver 2.00
Figure 19-13 Receive FIFO status
Address
0
Address
1
Read
Addr
Write
Addr
(
a
)
Receive a valid frame
(
b
)
Receive a valid frame
(
c
)
Receive a valid frame
(
d
)
Receive a valid frame
(
e
)
Release a frame
(
f
)
Release a frame
Address
2
Address
0
Address
1
Address
2
Address
0
Address
1
Address
2
Address
0
Address
1
Address
2
Address
0
Address
1
Address
2
Address
0
Address
1
Address
2
Read
Addr
Read
Addr
Read
Addr
Read
Addr
Read
Addr
Write
Addr
Write
Addr
Write
Addr
Write
Addr
Write
Addr
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