GD32A50x User Manual
629
t
PBS1_FD
= (DPBS1[2:0] + 1) × t
q_FD
(23-3)
t
PTS_FD
= DPTS[4:0] × t
q_FD
(23-4)
t
q_FD
= (DBAUDPSC[9:0] + 1) × t
CANCLK
(23-5)
where the
t
measure
is the measured transmitter delay,
t
offset
is the transmitter delay
compensation offset which is saved in the TDCO[4:0] bits of CAN_FDCTL register in unit of
t
CANCLK
,
t
offset
should not be larger than the CAN data bit time.
t
compensation
is the transmitter
delay compensation value saved in TDCV[5:0] bits of CAN_FDCTL register in unit of
t
CANCLK
.
In the equations, the DPBS1[2:0] bits, DPTS[4:0] bits, DBAUDPSC[9:0] bits are all configured
in CAN_FDBT register.
Figure 23-2. Transmitter delay
CAN_TX
CAN_RX
FDF
R0
BRS
ESI
DLC
TDCV
TDCO
Transmitter
delay
compensation
SSP
position
Arbitration phase
Data phase
TDCV
Transmitter
delay
The maximum
t
compensation
is
(
3 × data bit time - 2 × t
q_FD
)
. When exceed this value, it is
unable to compensate the transmitter delay, then TDCS bit in CAN_FDCTL register will be
set.
The implementation shall be able to compensate transmitter delays of at least two data
bit times.
23.3.9.
Errors and states
Transmit Error Counter (TECNT[7:0] bits in CAN_ERR0 register) and Receive Error
Counter
(RECNT[7:0] bits in the CAN_ERR0 register) take into account all errors in both CAN FD and
non-FD messages, which get incremented or decremented according to the error condition.
For detailed information about TECNT[7:0] and RECNT[7:0] management, please refer to the
CAN standard.
For CAN FD format frames, a Receive Error Counter for data phase of CAN FD messages
(REFCNT[7:0] bits in the CAN_ERR0 register) and a Transmit Error Counter for data phase
of CAN FD messages (TEFCNT[7:0] bits in the CAN_ERR0 register) are used additionally
only when the BRS field of the frame is set.
They stop counting and keep their values when
in Bus off state, and they restart counting after returned to error active state by Bus off
recovery.
Note:
When in Pretended Networking mode, receive error counters keep counting and error