AT32F425
Series Reference Manual
2022.03.30
Page 338
Ver 2.01
19.7.1.7 CAN error status register (CAN_ESTS)
Bit
Register
Reset value
Type
Description
Bit 31: 24 REC
0x00
ro
Receive error counter
This counter is implemented in accordance with the
receive part of the falut confinement mechanism of the
CAN protocol.
Bit 23: 16 TEC
0x00
ro
Transmit error counter
This counter is implemented in accordance with the
transmit part of the falut confinement mechanism of the
CAN protocol.
Bit 15: 7
Reserved
0x00
resd
Kept at its default value.
Bit 6: 4
ETR
0x0
rw
Error type record
000: No error
001: Bit stuffing error
010: Format error
011: Acknowledgement error
100: Recessive bit error
101: Dominant bit error
110: CRC error
111: Set by software
Note:
This field is used to indicate the current error type. It is set
by hardware according to the error condition detected on
the CAN bus. It is cleared by hardware when a message
has been transmitted or received successfully.
If the error code 7 is not used by hardware, this field can
be set by software to monitor the code update.
Bit 3
Reserved
0x0
resd
Kept at its default value.
Bit 2
BOF
0x0
ro
Bus-off flag
0: Bus-off state is not entered.
1: Bus-off state is entered.
Note: When the TEC is greater than 255, the bus-off state
is entered, and this bit is set by hardware.
Bit 1
EPF
0x0
ro
Error passive flag
0: Error passive state is not entered
1: Error passive state is entered
Note: This bit is set by hardware when the current error
times has reached the Error passive state limit (Receive
Error Counter or Transmit Error Counter >127)
Bit 0
EAF
0x0
ro
Error active flag
0: Error active state is not entered
1: Error active state is entered
Note: This bit is set by hardware when the current error
times has reached the Error active state limit (Receive
Error Counter or Transmit Error Counter ≥96)
19.7.1.8 CAN bit timing register (CAN_BTMG)
Bit
Register
Reset value
Type
Description
Bit 31
LOEN
0x0
rw
Listen-Only mode
0: Listen-Only mode disabled
1: Listen-Only mode enabled
Bit 30
LBEN
0x0
rw
Loop back mode
0: Loop back mode disabled
1: Loop back mode enabled
Bit 29: 26 Reserved
0x0
resd
Kept at its default value.
Bit 25: 24 RSAW
0x1
rw
Resynchronization width
tRSAW = tCAN x (RSAW[1: 0] + 1
)
Note: This field defines the maximum of time unit that the
CAN handware is allowed to lengthen or shorten in a bit.
Bit 23
Reserved
0x0
resd
Kept at its default value.
Bit 22: 20 BTS2
0x2
rw
Bit time segment 2
tBTS2 = tCAN x (BTS2[2: 0] + 1)