English
Language : 

LM3S8938 Datasheet, PDF (397/550 Pages) List of Unclassifed Manufacturers – Microcontroller
LM3S8938 Microcontroller
16.4.2
16.4.3
16.4.4
Operation
Once the CAN module is initialized and the INIT bit in the CANCTL register is reset to 0, the CAN
module synchronizes itself to the CAN bus and starts the message transfer. As messages are
received, they are stored in their appropriate message objects if they pass the message handler's
filtering. The whole message (including all arbitration bits, data-length code, and eight data bytes)
is stored in the message object. If the Identifier Mask (the Msk bits in the CANIFnMSKn registers)
is used, the arbitration bits which are masked to "don't care" may be overwritten in the message
object.
The CPU may read or write each message any time via the CAN Interface Registers (CANIFnCRQ,
CANIFnCMSK, CANIFnMSKn, CANIFnARBn, CANIFnMCTL, CANIFnDAn, and CANIFnDBn).
The message handler guarantees data consistency in case of concurrent accesses.
The transmission of message objects are under the control of the software that is managing the
CAN hardware. These can be message objects used for one-time data transfers, or permanent
message objects used to respond in a more periodic manner. Permanent message objects have
all arbitration and control set up and only the data bytes are updated. To start the transmission, the
TxRqst bit in the CANTXRQn register and the NewDat bit in the CANNWDAn register are set. If
several transmit messages are assigned to the same message object (when the number of message
objects is not sufficient), the whole message object has to be configured before the transmission of
this message is requested.
The transmission of any number of message objects may be requested at the same time; they are
transmitted according to their internal priority, which is based on the message identifier for the
message object. Messages may be updated or set to not valid any time, even when their requested
transmission is still pending. The old data is discarded when a message is updated before its pending
transmission has started. Depending on the configuration of the message object, the transmission
of a message may be requested autonomously by the reception of a remote frame with a matching
identifier.
There are two sets of CAN Interface Registers (CANIF1x and CANIF2x) which are used to access
the Message Objects in the Message RAM. The CAN controller coordinates transfers to and from
the Message RAM to and from the registers. The function of the two sets are independent and
identical and can be used to queue transactions.
Transmitting Message Objects
If the internal transmit shift register of the CAN module is ready for loading, and if there is no data
transfer between the CAN Interface Registers and message RAM, the valid message object with
the highest priority and which has a pending transmission request is loaded into the transmit shift
register by the message handler and the transmission is started. The message object's NewDat bit
is reset and can be viewed in the CANNWDAn register. After a successful transmission, and if no
new data was written to the message object since the start of the transmission, the TxRqst bit in
the CANIFnCMSK register is reset. If the TxIE bit in the CANIFnMCTL register is set, the IntPnd
bit in the CANIFnMCTL register is set after a successful transmission. If the CAN module has lost
the arbitration or if an error occurred during the transmission, the message is re-transmitted as soon
as the CAN bus is free again. If, meanwhile, the transmission of a message with higher priority has
been requested, the messages are transmitted in the order of their priority.
Configuring a Transmit Message Object
Table 16-1 on page 398 specifies the bit settings for a transmit message object.
June 14, 2007
397
Luminary Micro Confidential-Advance Product Information