
AT32F413
Series Reference Manual
2022.06.27
Page 291
Rev 2.00
20
CAN
20.1 CAN introduction
CAN (Controller Area Network) is a distributed and serial communication protocol for real-time and
reliable data communication among various nodes. It supports the CAN protocol version 2.0A and 2.0B.
20.2 CAN main features
Baud rates up to 1M bit/s
Supports the time triggered communication
Interrupt enable and maskable
Configurable automatic retransmission mode
Transmission
Three transmit mailboxes
Configurable transmit priority
Supports the time stamp on transmission
Reception
Two FIFOs with three-level depth
14 filter banks
Supports the identifier list mode
Supports the identifier mask mode
FIFO overrun management
Time triggered communication mode
16-bit timers
Time stamp on transmission
20.3 Baud rate configuration
The nominal bit time of the CAN bus consists of three parts as follows:
Synchronization segment (SYNC_SEG):
This segment has one time unit, and its time duration is
defined by the BRDIV[11: 0] bit in the CAN_BTMG register.
Bit segment 1 (BIT SEGMENT 1):
It is referred to as BSEG1 including the PROP_SEG and
PHASE_SEG1 of the CAN standard. Its duration is between 1 and 16 time units, defined by the BTS1[3:
0] bit.
Big segment 2 (BIT SEGMENT 2):
It is referred to as BSEG2 including the PHASE_SEG2 of the CAN
standard. Its duration is between 1 and 8 time units, defined by the BTS2[2: 0] bit.
Figure 20-1
Bit timing
SYNC_SEG
BSEG1
BSEG2
Nomal Bit Timing
Sample
Translate
t
BSEG1
t
BSEG2
t
SYNC_SEG
Baud rate formula:
𝐵𝑎𝑢𝑑𝑅𝑎𝑡𝑒 =
1
Nomal Bit Timimg
𝑁𝑜𝑚𝑎𝑙 𝐵𝑖𝑡 𝑇𝑖𝑚𝑖𝑛𝑔 = t
𝑆𝑌𝑁𝐶_𝑆𝐸𝐺
+ t
𝐵𝑆𝐸𝐺1
+ t
𝐵𝑆𝐸𝐺2
where
t
𝑆𝑌𝑁𝐶_𝑆𝐸𝐺
= 1 x t
𝑞