AT32F425
Series Reference Manual
2022.03.30
Page 323
Ver 2.01
depending on the CANx_PAUSE bit in the DEBUG_CTRL register or the PTD bit in the
CAN_MCTRL register.
Time triggered communication
The timer triggered communication is used to improve the real-time performance so as to avoid
bus competition. It is activated by setting TTCEN=1 in the CAN_MCTRL register. The internal 16-
bit timer is incremented each CAN bit time, and is sampled on the Start Of Frame bit to generate
the time stamp value, which is stored in the CAN_RFCx and CAN_TMCx register.
Register access protection
The CAN_BTMG register can be modified only when the CAN is in frozen mode.
Although the transmission of incorrect data will not cause problems at the network level, it can have
severe impact on the application. Thus a transmit mailbox can be modified only when it is in empty
state.
The filter configuration in the CAN_FMCFG, CAN_FBWCFG and CAN_FRF registers can be
modified only when FCS=1. The CAN_FiFBx register can be modified only when FCS=1 or FAENx=0.
19.6
Functional overview
19.6.1 General description
As the number of nodes in the CAN network and the number of messages grows, an enhanced filtering
mechanism is required to handle all types of meassages in order to reduce the processing time of
message reception. One FIFO scheme is used to ensure that the CPU can concentrate on application
tasks for a long period of time without the loss of messages. In the meantime, the priority order of the
messages to be transmitted is configured by hardware. Standard identifiers (11-bit) and extended
identifiers (29-bit) are fully supported by hardware.
Based on the above mentioned conditions, the CAN controller provides 14 scalable/configurable
identifier filter banks, 2 receive FIFOs with storing 3 complete messages each and being totally managed
by hardware, and 3 transmit mailboxes with their transmit priority order defined by the transmit scheduler.
Figure 19-7
CAN block diagram
Receive
FIFO [1:0]
box
0
box
1
box
2
14 filter banks
Bit timing control
RX/TX
Send arbitration
Email [2:0]
Receive
FIFO [1:0]
box
0
box
1
box
2
14 filter banks
RX/TX
Bit timing control
Send arbitration
Email [2:0]
CAN
CAN 1
CAN 2
19.6.2 Operating modes
The CAN controller has three operating modes:
Sleep mode
After a system reset, the CAN controller is in Sleep mode. In this mode, the CAN clock is stopped
to reduce power consumption and an internal pull-up resistance is disabled. However, the software
can still access to the mailbox registers.
The software request the CAN controller to enter Sleep mode by setting the DZEN bit in the
CAN_MCTRL register. The hardware confirms the request by setting the DZC bit in the CAN_MSTS
register.