Renesas M32R/ECU Series User Manual page 603

Mitsubishi 32-bit risc single-chip microcomputers
Table of Contents

Advertisement

13
(7) TRSTAT (Transmit/Receive Status) bit (Bit 6)
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 (Bit 7)
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 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.
13.2 CAN Module Related Registers
13-56
CAN MODULE
32180 Group User's Manual (Rev.1.0)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents