1.5.2 Receive Mailbox
1.5.3 CAN Module Operation in Normal Configuration
Message Mailbox
www.ti.com
If more than one mailbox is configured as transmit mailbox and more than one corresponding TRS[n] is
set, the messages are sent one after another in falling order beginning with the mailbox with the highest
priority.
In the SCC-compatibility mode, the priority of the mailbox transmission depends on the mailbox number.
The highest mailbox number (=15) comprises the highest transmit priority.
In the eCAN mode, the priority of the mailbox transmission depends on the setting of the TPL field in the
message control field (MSGCTRL) register. The mailbox with the highest value in the TPL is transmitted
first. Only when two mailboxes have the same value in the TPL is the higher numbered mailbox
transmitted first.
If a transmission fails due to a loss of arbitration or an error, the message transmission will be
reattempted. Before reattempting the transmission, the CAN module checks if other transmissions are
requested and then transmits the mailbox with the highest priority.
The identifier of each incoming message is compared to the identifiers held in the receive mailboxes using
the appropriate mask. When equality is detected, the received identifier, the control bits, and the data
bytes are written into the matching RAM location. At the same time, the corresponding
receive-message-pending bit, RMP[n] (RMP.31-0), is set and a receive interrupt is generated if enabled. If
no match is detected, the message is not stored.
When a message is received, the message controller starts looking for a matching identifier at the mailbox
with the highest mailbox number. Mailbox 15 of the eCAN in SCC compatible mode has the highest
receive priority; mailbox 31 has the highest receive priority of the eCAN in eCAN mode.
RMP[n] (RMP.31-0) has to be reset by the CPU after reading the data. If a second message has been
received for this mailbox and the receive-message-pending bit is already set, the corresponding
message-lost bit (RML[n] (RML.31-0)) is set. In this case, the stored message is overwritten with the new
data if the overwrite-protection bit OPC[n] (OPC.31-0) is cleared; otherwise, the next mailboxes are
checked.
If a mailbox is configured as a receive mailbox and the RTR bit is set for it, the mailbox can send a remote
frame. Once the remote frame is sent, the TRS bit of the mailbox is cleared by the CAN module.
If the CAN module is being used in normal configuration (i.e., not in self-test mode), there should be at
least one more CAN module on the network, configured for the same bit rate. The other CAN module
need NOT be configured to actually receive messages from the transmitting node. But, it should be
configured for the same bit rate. This is because a transmitting CAN module expects at least one node in
the CAN network to acknowledge the proper reception of a transmitted message. Per CAN protocol
specification, any CAN node that received a message will acknowledge (unless the acknowledge
mechanism has been explicitly turned off), irrespective of whether it has been configured to store the
received message or not. It is not possible to turn off the acknowledge mechanism in C28x DSPs.
The requirement of another node does not exist for the self-test mode (STM). In this mode, a transmitting
node generates its own acknowledge signal. The only requirement is that the node be configured for any
valid bit-rate. That is, the bit timing registers should not contain a value that is not permitted by the CAN
protocol.
It is not possible to achieve a direct digital loopback externally by connecting the CANTX and CANRX pins
together (as is possible with SCI/SPI/McBSP modules). An internal loopback is possible in the self-test
mode (STM).
Architecture
24
SPRU074F – May 2002 – Revised January 2009