![](http://datasheet.mmic.net.cn/30000/M30956FKTGP_datasheet_2359453/M30956FKTGP_415.png)
23. 32-Slot CAN Module
23.1.1.1 RESET1 and RESET0 Bits
When both bits RESET1 and RESET0 are set to 1 (CAN module is reset), the CAN module is immediately reset
regardless of ongoing CAN communication.
After both bits RESET1 and RESET0 are set to 1 and the CAN module reset is completed, the C2TSR register
becomes 0000h. Also, registers C2TEC and C2REC become 00h and both bits STATE_ERRPAS and
STATE_BUSOFF in the C2STR register become 0.
When both bits RESET1 and RESET0 are changed from 1 to 0, the C2TSR register starts counting. The CAN
module is permitted to communicate after 11 consecutive recessive bits have been detected.
NOTES:
1. Set the same value in bits RESET1 and RESET0 simultaneously.
2. Ensure that the STATE_RESET bit in the C2STR register becomes 1 (CAN module is in reset) after both
bits RESET1 and RESET0 are set to 1.
3. The CAN2OUT pin outputs a high-level (“H”) signal as soon as bits RESET1 and RESET0 are set to 1.
CAN bus error may occur by setting both bits RESET1 and RESET0 to 1 while the CAN frame is being
transmitted.
4. To select pins CAN2IN and CAN2OUT for CAN communication, set registers PS0, PSL0, and PD6 while
the STATE_RESET bit is 1 (CAN module is in reset).
23.1.1.2 LOOPBACK Bit
When the LOOPBACK bit is set to 1 (loopback function enabled) and the receive message slot has the
identifier (ID) and frame format matched with a transmitted frame, the transmitted frame is stored to the receive
message slot.
NOTES:
1. No ACK for the transmitted frame is returned.
2. Change the LOOPBACK bit setting while the STATE_RESET bit is 1 (CAN module is in
reset).
23.1.1.3 BASICCAN Bit
When the BASICCAN bit is set to 1, the message slots 30 and 31 enter BasicCAN mode.
In BasicCAN mode, the message slots 30 and 31 can be used as dual-structured buffers.
Acceptance filtering permits the receive frames having the matching IDs to be stored into the message slots 30
and 31 alternately. Both data frame and remote frame can be received.
Use the following procedure to enter BasicCAN mode.
(1) Set the BASICCAN bit to 1.
(2) Set the same ID to the message slots 30 and 31.
(3) Set the same values in registers C2LMAR0 to C2LMAR4 and C2LMBR0 to C2LMBR4.
(4) Set the same values to bits IDE30 and IDE31 in the C2IDR register.
(5) Set registers C2MCTL30 and C2MCTL31 to receive a data frame.
NOTES:
1. Change the BASICCAN bit setting while the STATE_RESET bit is 1 (CAN module is in reset).
2. The message slot 30 is the first slot to become active after bits RESET1 and RESET0 are set to 0.
3. The settings to enter BasicCAN mode has no affect on the message slot 0 to 29.