![](http://datasheet.mmic.net.cn/30000/M32196F8UFP_datasheet_2359476/M32196F8UFP_703.png)
13.2 CAN Module Related Registers
CAN MODULE
13
13-85
32192/32195/32196 Group Hardware Manual
Rev.1.10 REJ09B0123-0110 Apr.06.07
Slots 30 and 31
The function of this bit differs depending on how the CAN Control Register BCM (BasicCAN Mode)
bit is set.
If BCM = "0" (normal operation), this bit is set to "1" when the message slot is set for remote frame
transmission (reception).
If BCM = "1" (BasicCAN), this bit indicates which type of frame is received. During BasicCAN mode,
the received data is stored in slots 30 and 31 for both data and remote frames.
If RA = "0," it means that the frame stored in the slot is a data frame.
If RA = "1," it means that the frame stored in the slot is a remote frame.
(6) ML (Message Lost) bit (Bits 5, 13)
This bit is effective for receive slots. It is set to "1" when unread received data contained in the message slot
is overwritten by reception. This bit is cleared by writing "0" in software.
(7) TRSTAT (Transmit/Receive Status) bit (Bits 6, 14)
This bit indicates that the CAN module is sending or receiving and is accessing the message slot. This bit is
set to "1" when the CAN module is accessing, and set to "0" when not accessing.
During a transmit slot
This bit is set to "1" when a transmit request for the message slot is accepted. It is cleared to "0" when
the CAN module lost in bus arbitration, when a CAN bus error occurs, or when transmission is
completed.
During a receive slot
This bit is set to "1" while the CAN module is receiving data, with the received data being stored in the
message slot. Note that the value read from the message slot while the TRSTAT bit remains set is
undefined.
(8) TRFIN (Transmit/Receive Finished) bit (Bits 7, 15)
This bit indicates that the CAN module finished sending or receiving.
When set for a transmit slot
This bit is set to "1" when the CAN module finished sending the data stored in the message slot.
This bit is cleared by writing "0" in software. However, it cannot be cleared when the TRSTAT
(Transmit/Receive Status) bit = "1."
When set for a receive slot
This bit is set to "1" when the CAN module finished receiving normally the data to be stored in the
message slot. This bit is cleared by writing "0" in software. However, it cannot be cleared when the
TRSTAT (Transmit/Receive Status) bit = "1."
Notes: Before reading the received data out of the message slot, be sure to clear the TRFIN
(Transmit/Receive Finished) bit to "0." If the TRFIN (Transmit/Receive Finished) bit hap-
pens to be set to "1" after a read, it means that new received data was stored while
reading and the read data contains an undefined value. In that case, discard the read
data, clear the TRFIN bit to "0" and read out data again.
When sending/receiving remote frames, the TRFIN bit is automatically cleared to "0" by
hardware. Therefore, the TRFIN bit cannot be used as a transmission/reception-finished
flag.