GD32A50x User Manual
610
Refer to ID_C_0[7:0] descriptions.
23.3.3.
Communication modes
The CAN interface has four communication modes:
Normal mode
Inactive mode
Loopback and silent mode
Monitor mode
Normal mode
In normal mode, the message reception and transmission, and errors are all managed
normally, and all CAN protocol functions are enabled.
Inactive mode
To enter Inactive mode, set INAMOD bit in CAN_CTL0 to 1 to enable Inactive mode, then set
HALT bit in CAN_CTL0 register to 1 or put the chip into Debug mode.
When Inactive mode is requested, the following steps are performed before INAS bit asserted:
1.
Wait for the bus 11 consecutive recessive bits.
2.
Wait for the current transmission or reception processes being finished, it means all
internal activities such as arbitration, matching, shift-in, and shift-out being finished. A
pending shift-in does not prevent entering Inactive mode.
3.
The Tx pin is driven as ‘1’ (recessive).
4.
Stop the prescaler.
5.
Enable write access to the CAN_ERR0 register, which is read-only in other modes.
6.
Set NRDY bit and INAS bit in CAN_CTL0 register.
When Inactive mode is entered, INAS bit in CAN_CTL0 register is set to 1 by CAN.
In Inactive mode, neither transmission nor reception is performed, and its prescaler is stopped,
all registers are accessible.
To exit from Inactive mode, one of the following methods can meet:
Clear INAMOD bit in CAN_CTL0.
Clear HALT bit in CAN_CTL0 register, or the chip is removed from Debug mode.
If exiting from Inactive mode is requested, then INAS bit in CAN_CTL0 register is cleared
after the CAN prescaler is running again. When out of Inactive mode, CAN module tries to
resynchronize to the CAN bus by waiting for 11 consecutive recessive bits.
Note:
When in Inactive mode, the CAN_Disable mode request will lead to INAS bit in
CAN_CTL0 register be cleared and LPS bit in CAN_CTL0 register be set.