Functional Description
After a successful transmission and if no new data was written to the message object (NewDat = ‘0’) since
the start of the transmission, the TxRqst bit will be reset. If TxIE is set, IntPnd will be set after a successful
transmission. If the DCAN has lost the arbitration or if an error occurred during the transmission, the
message will be retransmitted as soon as the CAN bus is free again. If meanwhile the transmission of a
message with higher priority has been requested, the messages will be transmitted in the order of their
priority.
If automatic retransmission mode is disabled by setting the DAR bit in the CAN control register, the
behavior of bits TxRqst and NewDat in the Message Control register of the interface register set is as
follows:
•
When a transmission starts, the TxRqst bit of the respective interface register set is reset, while bit
NewDat remains set.
•
When the transmission has been successfully completed, the NewDat bit is reset.
When a transmission failed (lost arbitration or error) bit NewDat remains set. To restart the transmission,
the application has to set TxRqst again.
Received remote frames do not require a receive object. They will automatically trigger the transmission of
a data frame, if in the matching transmit object the RmtEn bit is set.
23.3.15.4 Updating a Transmit Object
The CPU may update the data bytes of a transmit object any time via the IF1/IF2 interface registers,
neither D nor TxRqst have to be reset before the update.
Even if only part of the data bytes is to be updated, all four bytes in the corresponding IF1/IF2 Data A
register (DCAN IF1DATA/DCAN IF2DATA) or IF1/IF2 Data B register (DCAN IF1DATB/DCAN IF2DATB)
have to be valid before the content of that register is transferred to the message object. Either the CPU
has to write all four bytes into the IF1/IF2 data register or the message object is transferred to the IF1/IF2
data register before the CPU writes the new data bytes.
When only the data bytes are updated, first 0x87 can be written to bits [23:16] of the IF1/IF2 Command
register (DCAN IF1CMD/DCAN IF2CMD) and then the number of the message object is written to bits
[7:0] of the command register, concurrently updating the data bytes and setting TxRqst with NewDat.
To prevent the reset of TxRqst at the end of a transmission that may already be in progress while the data
is updated, NewDat has to be set together with TxRqst in event driven CAN communication. For details,
see
When NewDat is set together with TxRqst, NewDat will be reset as soon as the new transmission has
started.
23.3.15.5 Changing a Transmit Object
If the number of implemented message objects is not sufficient to be used as permanent message objects
only, the transmit objects may be managed dynamically. The CPU can write the whole message
(arbitration, control, and data) into the interface register. The bits [23:16] of the command register can be
set to 0xB7 for the transfer of the whole message object content into the message object. Neither D nor
TxRqst have to be reset before this operation.
If a previously requested transmission of this message object is not completed but already in progress, it
will be continued; however, it will not be repeated if it is disturbed.
To only update the data bytes of a message to be transmitted, bits [23:16] of the command register should
be set to 0x87.
NOTE:
After the update of the transmit object, the interface register set will contain a copy of the
actual contents of the object, including the part that had not been updated.
3903
SPRUH73H – October 2011 – Revised April 2013
Controller Area Network (CAN)
Copyright © 2011–2013, Texas Instruments Incorporated