GD32A50x User Manual
627
When BRSEN bit in CAN_FDCTL register is set to 1 (takes effect at the next message), and
BRS bit in Tx mailbox is written as recessive ‘1’, then higher bit time (called as data bit time)
will be used for the Data Phase of CAN FD frame, the nominal bit time will be used for the
rest of the bits. The bit time is changed at the sample point of the BRS bit. The data bit time
is configured in CAN_FDBT register. The nominal bit time is configured in CAN_BT register.
When BRSEN bit in CAN_FDCTL register is set to 0, or when BRS bit in Tx mailbox is written
as 0, then nominal bit time will be used for the entire CAN FD frame.
Note:
The length of time quantum should be the same for the entire CAN FD frame, to reduce
the possibilities of phase error frames on the CAN bus.
In FD frames, all nodes shall accept an up to two bit long dominant phase of overlapping ACK
slot bits as a valid ACK, to compensate for phase shifts between the receivers. (Refer to
ISO11898-1 specification)
CAN FD ESI
The transmission of ESI bit (the bit before DLC bits, refer to ISO11898-1 or Bosch CAN FD
Specification V1.0) is defined by ESI field in MDES0 word of Tx mailbox and ERRSI[1:0] bits
in CAN_ERR1 register. If ESI field in MDES0 is 0, it will transmit the dominant bit by error
active nodes and transmit the recessive bit by error passive nodes according to ERRSI[1:0]
bits in CAN_ERR1 register. If ESI field in MDES0 is 1, it will transmit ESI field in MDES0 word.
CAN FD CRC
Different CRC polynomials are used for different frame formats, results in a Hamming distance
of 6:
The CRC_15 polynomial is used for frames in CAN classical format: 0xC599
x15 + x14 + x10 + x8 + x7 + x4 + x3 + 1
The CRC_17 polynomial is used for frames in CAN FD format with DATA field no more
than 16 bytes: 0x3685B
x17 + x16 + x14 + x13 + x11 + x6 + x4 + x3 + x1 + 1
The CRC_21 polynomial is used for frames in CAN FD format with DATA field more than
16 bytes: 0x302899
x21 + x20 + x13 + x11 + x7 + x4 + x3 + 1
For transmission, these three types of CRC will all be calculated at the start of the frame, and
the final CRC to be transmitted is determined by the FDF field and DLC field of the frame.
After a successful transmission, when corresponding MSx bit of CAN_STAT register is set,
the CAN_CRCCFD register is updated at the same time, with the calculated CRC for both
CAN FD and non-FD messages. The CAN_CRCC register only stores the calculated CRC
for CAN classical format frames.
For reception, the CRC polynomial used for CRC check is determined by the received FDF
and DLC field.