Receive/Transmit Priority; Transmission Of Messages In Event Driven Can Communication; Updating A Transmit Object - Texas Instruments Concerto F28M35 Series Technical Reference Manual

Table of Contents

Advertisement

Message Handling

23.11.2 Receive/Transmit Priority

The receive/transmit priority for the message objects is attached to the message number, not to the CAN
identifier. Message object 1 has the highest priority, while message object 32 has the lowest priority. If
more than one transmission request is pending, they are serviced due to the priority of the corresponding
message object, so for example, messages with the highest priority can be placed in the message objects
with the lowest numbers.
The acceptance filtering for received data frames or remote frames is also done in ascending order of
message objects, so a frame that has been accepted by a message object cannot be accepted by another
message object with a higher message number. The last message object may be configured to accept
any data frame or remote frame that was not accepted by any other message object, for nodes that need
to log the complete message traffic on the CAN bus.

23.11.3 Transmission of Messages in Event Driven CAN Communication

If the shift register of the CAN Core is ready for loading and if there is no data transfer between the IFx
registers and Message RAM, the MsgVal bits in the Message Valid register and the TxRqst bits in the
transmission request register are evaluated. The valid message object with the highest priority pending
transmission request is loaded into the shift register by the message handler and the transmission is
started. The message object's NewDat bit is reset.
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 CAN 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.11.4 Updating a Transmit Object

The CPU may update the data bytes of a transmit object any time via the IF1 or IF2 interface registers,
neither MsgVal nor TxRqst have to be reset before the update.
Even if only a part of the data bytes are to be updated, all four bytes in the corresponding IF1 or IF2 Data
A register, or the IF1 or IF2 Data B register 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 or IF2 Data
register, or the message object is transferred to the IF1 or 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 Command register
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
Section
23.11.3.
When NewDat is set together with TxRqst, NewDat will be reset as soon as the new transmission has
started.
1526
M3 Controller Area Network (CAN)
Copyright © 2012–2019, Texas Instruments Incorporated
SPRUH22I – April 2012 – Revised November 2019
Submit Documentation Feedback
www.ti.com

Advertisement

Table of Contents
loading

Table of Contents