CAN Module
deveopmen
Rev.B2 for proof reading
Mitsubishi Microcomputers
M32C/83 group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
227
20. CAN0 message slot i control register
Bit 0: Transmission finished flag /reception finished flag (SentData, NewData)
This bit indicates that the CAN module finished transmitting or receiving a message.
For transmit slots
The bit is set to 1 when the CAN module finished transmitting from the message slot.
This bit is cleared by writing 0 in software. However, it cannot be cleared when the TrmActive
(transmit/receive status) bit = 1.
For receive slots
The bit is set to 1 when the CAN module finished receiving a message normally that is to be stored
in the message slot.
This bit is cleared by writing 0 in software. However, it cannot be cleared when the InvalData (trans-
mit/receive status) bit = 1.
Note 1: Before reading received data from the message slot, be sure to clear the NewData (transmis-
sion/reception finished status) bit. Also, if the NewData bit is set to 1 after readout, it means
that new received data has been stored in the message slot while reading out from the slot,
and that the read data contains an indeterminate value. In this case, discard the read data
and clear the NewData bit before reading out from the slot again.
Note 2: The NewData bit is not set by a completion of remote frame transmission or reception.
Bit 1: Transmitting flag /receiving flag (TrmActive, InvalData)
This bit indicates that the CAN module is transmitting or receiving a message, with the message slot
being accessed. The bit is set to 1 when the CAN module is accessing the message slot and set to 0
when not accessing the message slot.
For transmit slots
This bit is set to 1 when the message slot has its transmit request accepted. If the message slot
failed in arbitration, this bit is cleared to 0 by occurrence of a CAN bus error or completion of trans-
mission.
For receive slots
This bit is set to 1 when the CAN module is receiving a message, with the received message being
stored in the message slot. Note that the value read out from the message slot while this bit remains
set is indeterminate.
Bit 2: Overwrite flag (MsgLost)
This bit is useful for the receive slots, those that are set for reception. This bit is set to 1 when while
the message slot contains an unread received message, it is overwritten by a new received mes-
sage.
This bit is cleared by writing 0 in software.
Bit 3: Remote frame transmit/receive status flag (RemActive)
This bit functions differently for slots 0
–
13 and slots 14, 15.
For slots 0
–
13
If the slot is set for remote frame transmission (or reception), this bit is set to 1. Then, when the slot
finished transmitting (or receiving) a remote frame, this bit is cleared to 0.