19.3.7 Receiving a Data Frame
The message handler stores the message from the CAN controller receive shift register into the
matching message object in the message RAM. The data bytes, all arbitration bits, and the DLC bits
are all stored into the corresponding message object. In this manner, the data bytes are connected
with the identifier even if arbitration masks are used. The NEWDAT bit of the CANIFnMCTL register
is set to indicate that new data has been received. The CPU should clear this bit when it reads the
message object to indicate to the controller that the message has been received, and the buffer is
free to receive more messages. If the CAN controller receives a message and the NEWDAT bit is
already set, the MSGLST bit in the CANIFnMCTL register is set to indicate that the previous data
was lost. If the system requires an interrupt on successful reception of a frame, the RXIE bit of the
CANIFnMCTL register should be set. In this case, the INTPND bit of the same register is set, causing
the CANINT register to point to the message object that just received a message. The TXRQST bit
of this message object should be cleared to prevent the transmission of a remote frame.
19.3.8 Receiving a Remote Frame
A remote frame contains no data, but instead specifies which object should be transmitted. When
a remote frame is received, three different configurations of the matching message object have to
be considered:
Table 19-2. Message Object Configurations
DescriptionConfiguration in CANIFnMCTL
At the reception of a matching remote frame, the TXRQST bit of this
message object is set. The rest of the message object remains
unchanged, and the controller automatically transfers the data in
the message object as soon as possible.
■ DIR = 1 (direction = transmit); programmed in the
CANIFnARB2 register
■ RMTEN = 1 (set the TXRQST bit of the
CANIFnMCTL register at reception of the frame
to enable transmission)
■ UMASK = 1 or 0
At the reception of a matching remote frame, the TXRQST bit of this
message object remains unchanged, and the remote frame is
ignored. This remote frame is disabled, the data is not transferred
and nothing indicates that the remote frame ever happened.
■ DIR = 1 (direction = transmit); programmed in the
CANIFnARB2 register
■ RMTEN = 0 (do not change the TXRQST bit of the
CANIFnMCTL register at reception of the frame)
■ UMASK = 0 (ignore mask in the CANIFnMSKn
register)
At the reception of a matching remote frame, the TXRQST bit of this
message object is cleared. The arbitration and control field (ID +
XTD + RMTEN + DLC) from the shift register is stored into the message
object in the message RAM, and the NEWDAT bit of this message
object is set. The data field of the message object remains
unchanged; the remote frame is treated similar to a received data
frame. This mode is useful for a remote data request from another
CAN device for which the TM4C1294NCPDT controller does not
have readily available data. The software must fill the data and
answer the frame manually.
■ DIR = 1 (direction = transmit); programmed in the
CANIFnARB2 register
■ RMTEN = 0 (do not change the TXRQST bit of the
CANIFnMCTL register at reception of the frame)
■ UMASK = 1 (use mask (MSK, MXTD, and MDIR in
the CANIFnMSKn register) for acceptance filtering)
19.3.9 Receive/Transmit Priority
The receive/transmit priority for the message objects is controlled by the message number. Message
object 1 has the highest priority, while message object 32 has the lowest priority. If more than one
transmission request is pending, the message objects are transmitted in order based on the message
1363June 18, 2014
Texas Instruments-Production Data
Tiva
™
TM4C1294NCPDT Microcontroller