English
Language : 

LM3S5662 Datasheet, PDF (581/841 Pages) Texas Instruments – Stellaris® LM3S5662 Microcontroller
Stellaris® LM3S5662 Microcontroller
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.
15.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:
Configuration in CANIFnMCTL
Description
■ DIR = 1 (direction = transmit); programmed in the At the reception of a matching remote frame, the TXRQST bit of this
CANIFnARB2 register
message object is set. The rest of the message object remains
unchanged, and the controller automatically transfers the data in
■ RMTEN = 1 (set the TXRQST bit of the
the message object as soon as possible.
CANIFnMCTL register at reception of the frame
to enable transmission)
■ UMASK = 1 or 0
■ DIR = 1 (direction = transmit); programmed in the At the reception of a matching remote frame, the TXRQST bit of this
CANIFnARB2 register
message object remains unchanged, and the remote frame is
ignored. This remote frame is disabled, the data is not transferred
■ RMTEN = 0 (do not change the TXRQST bit of the and there is no indication that the remote frame ever happened.
CANIFnMCTL register at reception of the frame)
■ UMASK = 0 (ignore mask in the CANIFnMSKn
register)
■ DIR = 1 (direction = transmit); programmed in the At the reception of a matching remote frame, the TXRQST bit of this
CANIFnARB2 register
message object is cleared. The arbitration and control field (ID +
XTD + RMTEN + DLC) from the shift register is stored into the
■ RMTEN = 0 (do not change the TXRQST bit of the message object in the message RAM and the NEWDAT bit of this
CANIFnMCTL register at reception of the frame) message object is set. The data field of the message object remains
unchanged; the remote frame is treated similar to a received data
■ UMASK = 1 (use mask (MSK, MXTD, and MDIR in frame. This is useful for a remote data request from another CAN
the CANIFnMSKn register) for acceptance filtering) device for which the Stellaris controller does not have readily
available data. The software must fill the data and answer the frame
manually.
15.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
object with the lowest message number. This should not be confused with the message identifier
as that priority is enforced by the CAN bus. This means that if message object 1 and message object
2 both have valid messages that need to be transmitted, message object 1 will always be transmitted
first regardless of the message identifier in the message object itself.
15.3.10 Configuring a Receive Message Object
The following steps illustrate how to configure a receive message object.
1. Program the CAN IFn Command Mask (CANIFnCMASK) register as described in the
“Configuring a Transmit Message Object” on page 578 section, except that the WRNRD bit is set
to specify a write to the message RAM.
2. Program the CANIFnMSK1and CANIFnMSK2 registers as described in the “Configuring a
Transmit Message Object” on page 578 section to configure which bits are used for acceptance
November 17, 2011
581
Texas Instruments-Production Data