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. If the TRS
bit of a higher-priority (determined either by the MBX number or by the associated TPL value) mailbox had been
set before the message in the transmit-buffer has lost arbitration, the transmit-buffer contents will be replaced
with that of the higher-priority mailbox and the higher priority mailbox will be transmitted after the arbitration loss.
However, if that TRS bit was set after the message in the transmit-buffer has lost arbitration, the higher priority
MBX will be transmitted only after the current message in the transmit-buffer has been transmitted.
16.6.2 Receive Mailbox
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. In addition to
the TRS bit, the RTR bit is also cleared. The mailbox needs to be disabled in order to set this bit again.
16.6.3 CAN Module Operation in Normal Configuration
If the CAN module is being used in normal configuration (that is, 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 into the mailbox RAM 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 the eCAN module.
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).
16.7 eCAN Configuration
This section explains the process of initialization and describes the procedures to configure the eCAN module.
16.7.1 CAN Module Initialization
The CAN module must be initialized before the utilization. Initialization is only possible if the module is in
initialization mode.
is a flow chart showing the process.
Programming CCR (CANMC.12) = 1 sets the initialization mode. The initialization can be performed only when
CCE (CANES.4) = 1. Afterwards, the configuration registers can be written.
Controller Area Network (CAN)
1010
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......