
Table 23.4
C2MCTLi Register (i = 0 to 31) Settings for Transmit/Receive Operation
23.1.21.1 SENTDATA/NEWDATA Bit
The SENTDATA/NEWDATA bit indicates CAN message transmit/receive operations is completed. Set the
SENTDATA/NEWDATA bit to 0 (transmit/receive operation not completed) by program prior to transmitting
or receiving. The SENTDATA/NEWDATA bit is not set to 0 automatically. When the TRMACTIVE/
INVALDATA bit is 1 (transmitting or storing receive data), the SENTDATA/NEWDATA bit cannot be set to
0.
SENTDATA: The SENTDATA bit becomes 1 (transmit operation completed) when a transmit operation is
completed in the transmit message slot.
NEWDATA: The NEWDATA bit becomes 1 (receive operation completed) after the message to be stored
into the message slot i (i = 0 to 31) is successfully received.
NOTES:
1. To read a receive data from the message slot i, set the NEWDATA bit to 0 before reading. If the
NEWDATA bit is 1 while reading the message slot, this indicates that new receive data has been stored
into the message slot while reading and the returned data contains an undefined value. In this case, discard
the data with an undefined value and then read the message slot again after setting the NEWDATA bit to
0.
2. When the remote frame is transmitted or received, the SENTDATA/NEWDATA bit remains unchanged
even after remote frame transmit or receive operation is completed. The SENTDATA/NEWDATA bit
becomes 1 when the following data frame transmit or receive operations is completed.
23.1.21.2 TRMACTIVE/INVALDATA Bit
The TRMACTIVE/INVALDATA bit indicates that the CAN protocol controller is accessing the message slot i.
The TRMACTIVE/INVALDATA bit becomes 1 when the controller is accessing, and becomes 0 when not
accessing.
TRMACTIVE: The TRMACTIVE bit becomes 1 (transmitting) when a transmit operation is started. The
TRMACTIVE bit becomes 0 (not transmitting) when the CAN module loses arbitration, a
CAN bus error occurs, or when a transmit operation is completed.
INVALDATA: The INVALDATA bit is 1 (storing received data) while the received message is being stored
into the message slot i after the receive operation is completed. The INVALDATA bit becomes
0 (not storing received data) when the receive data has been stored. While the INVALDTA bit
is 1, a value read from the message slot i is undefined.
Settings for the C2MCTLi Register
Transmit/Receive
Operation Mode
TRMREQ RECREQ
REMOTE RSPLOCK REMACTIVE MSGLOST TRMACTIVE
INVALDATA
SENTDATA
NEWDATA
0
00
0
No transmit or receive
operation
0
1
0
Data frame receive
operation
0
1
0
Remote frame receive
operation
0
1
0
Remote frame receive
operation (Data frame is
transmitted after remote
frame is received.)
1
0
Data frame transmit
operation
1
0
1
0
Remote frame transmit
operation (Data frame is
received after remote
frame is transmitted)