GD32VF103 User Manual
428
20.3.
Function overview
Figure 20-1. CAN module block diagram
Figure 20-1. CAN module block diagram
CAN0
Transmit
mailbox[0..2]
Receive
FIFO[0..1]
CAN1
Transmit
mailbox[0..2]
Receive
FIFO[0..1]
CAN0 Tx/Rx
CAN1 Tx/Rx
M
a
ilb
o
x
2
M
a
ilb
o
x
1
M
a
ilb
o
x
0
M
a
ilb
o
x
2
M
a
ilb
o
x
1
M
a
ilb
o
x
0
20.3.1.
Working mode
The CAN interface has three working modes:
Sleep working mode.
Initial working mode.
Normal working mode.
Sleep working mode
Sleep working mode is the default mode after reset. In sleep working mode, the CAN is in the
low-power status while the CAN clock is stopped.
When SLPWMOD bit in CAN_CTL register is set, the CAN enters the sleep working mode.
Then the SLPWS bit in CAN_STAT register is set.
To leave sleep working mode automatically: the AWU bit in CAN_CTL register is set and the
CAN bus activity is detected. To leave sleep working mode by software: clear the SLPWMOD
bit in CAN_CTL register.
Sleep working mode to Initial working mode: Set IWMOD bit and clear SLPWMOD bit in
CAN_CTL register.
Sleep working mode to Normal working mode: Clear IWMOD and SLPWMOD bit in CAN_CTL
register.