CAN Message Transfer
1443
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
Controller Area Network (DCAN) Module
27.9 CAN Message Transfer
Once the DCAN is initialized and Init bit is reset to zero, the CAN Core synchronizes itself to the CAN bus
and is ready for message transfer as per the configured message objects.
The CPU may enable the interrupt lines (setting IE0 and IE1 to 1) at the same time when it clears Init and
CCE. The status interrupts EIE and SIE may be enabled simultaneously.
The CAN communication can be carried out in any of the following two modes:
1. Interrupt mode
2. Polling mode.
The Interrupt Register points to those message objects with IntPnd = 1. It is updated even if the interrupt
lines to the CPU are disabled (IE0 / IE1 are zero).
The CPU may poll all Message Object’s NewDat and TxRqst bits in parallel from the NewData X
Registers and the Transmission Request X Registers. Polling can be made easier if all Transmit Objects
are grouped at the low numbers, all Receive Objects are grouped at the high numbers.
Received messages are stored into their appropriate message objects if they pass acceptance filtering.
The whole message (including all arbitration bits, DLC and up to eight data bytes) is stored into the
message object. As a consequence, when the identifier mask is used, the arbitration bits that are masked
to “don’t care” may change in the message object when a received message is stored.
The CPU may read or write each message at any time via the Interface Registers, as the Message
Handler guarantees data consistency in case of concurrent accesses (for reconfiguration, see
)
If a permanent message object (arbitration and control bits set up during configuration and leaving
unchanged for multiple CAN transfers) exists for the message, it is possible to only update the data bytes.
If several transmit messages should be assigned to one message object, the whole message object has
to be configured before the transmission of this message is requested.
The transmission of multiple message objects may be requested at the same time. They are subsequently
transmitted, according to their internal priority.
Messages may be updated or set to not valid at any time, even if a requested transmission is still pending
(for reconfiguration, see
). However, the data bytes will be discarded if a message is
updated before a pending transmission has started.
Depending on the configuration of the message object, a transmission may be automatically requested by
the reception of a remote frame with a matching identifier.
27.9.1 Automatic Retransmission
According to the CAN Specification (ISO11898), the DCAN provides a mechanism to automatically
retransmit frames that have lost arbitration or have been disturbed by errors during transmission. The
frame transmission service will not be confirmed to you before the transmission is successfully completed.
By default, this automatic retransmission is enabled. It can be disabled by setting bit DAR (Disable
Automatic Retransmission) in CAN Control Register. Further details to this mode are provided in
.