Functional Description
23.3.8.1.2 Configuration of Message Objects
The message objects can be configured only through the interface registers; the CPU does not have direct
access to the message object (message RAM) . Familiarize yourself with the interface register set (IFx)
usage (see
) and the message object structure (see
) before configuring
the message objects.
For more information regarding the procedure to configure the message objects, see
. All
the message objects should be configured to particular identifiers or set to not valid before the message
transfer is started. It is possible to change the configuration of message objects during normal operation
(that is between data transfers).
NOTE:
The message objects initialization is independent of the bit-timing configuration.
23.3.8.1.3 DCAN RAM Hardware Initialization
The memory hardware initialization for the DCAN module is enabled in the device control register,
, which initializes the RAM with zeros and sets parity bits accordingly. Wait for the
RAMINIT_DONE bit to be set to ensure successful RAM initialization. Ensure the clock to the DCAN
module is enabled before starting this initialization.
For more details on RAM hardware initialization, see
, Control Module.
23.3.8.2 CAN Message Transfer (Normal Operation)
Once the DCAN is initialized and the 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: interrupt and polling.
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 MessageObject’s NewDat and TxRqst bits in parallel from the NewData X registers
and the Transmission Request X Registers (DCAN TXRQ X). Polling can be made easier if all transmit
objects are grouped at the low numbers and 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 (e.g., when the identifier mask is used), the arbitration bits which 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.
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.
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.
3889
SPRUH73H – October 2011 – Revised April 2013
Controller Area Network (CAN)
Copyright © 2011–2013, Texas Instruments Incorporated