
Table 22.4
CiMCTLj Register (i = 0, 1, j = 0 to 15) Settings for Transmit/Receive Operation
22.1.20.1 SENTDATA/NEWDATA Bit
The SENTDATA/NEWDATA bit indicates CAN message transmit/receive operation 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. While 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 j (j = 0 to 15) is successfully received.
NOTES:
1. To read a receive data from the message slot j, set the NEWDATA bit to 0 before reading. If the
NEWDATA bit has become 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 operation is completed.
22.1.20.2 TRMACTIVE/INVALDATA Bit
The TRMACTIVE/INVALDATA bit indicates that the CAN protocol controller is accessing the message slot j.
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 receive data) while the received message is being stored
into the message slot j after the receive operation is completed. The INVALDATA bit becomes
0 (not storing receive data) when the receive data has been stored. While the INVALDTA bit is
1, a value read from the message slot j is undefined.
Settings for the CiMCTLj 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
00
0
Data frame receive
operation
0
1
10
00
0
Remote frame receive
operation
0
1
00
0
Remote frame receive
operation (Data frame is
transmitted after remote
frame is received.)
1
0
00
0
Data frame transmit
operation
1
0
1
00
0
Remote frame transmit
operation (Data frame is
received after remote
frame is transmitted)