16.7.3.2 Answering a Remote Request
To answer a remote request, the following is needed:
1. Configure the object as a transmit mailbox.
2. Set the auto answer mode (AAM) (MSGID.29) bit in the MSGID register before the mailbox is enabled.
3. Update the data field.
MDL, MDH(1) = xxxxxxxxh
4. Enable the mailbox by setting the CANME bit to 1.
When a remote request is received from another node, the TRS flag is set automatically and the data is
transmitted to that node. The identifier of the received message and the transmitted message are the same.
After transmission of the data, the TA flag is set. The CPU can then update the data.
16.7.3.3 Updating the Data Field
To update the data of an object that is configured in auto answer mode, the following steps need to be
performed. This sequence can also be used to update the data of an object configured in normal transmission
with TRS flag set.
1. Set the change data request (CDR) (CANMC.8) bit and the mailbox number (MBNR) of that object in the
master control register (CANMC). This signals the CAN module that the CPU wants to change the data field.
For example, for object 1:
Write CANMC = 0x0000101
2. Write the message data into the mailbox data register. For example:
Write CANMDL(1) = xxxx0000h
3. Clear the CDR bit (CANMC.8) to enable the object.
Write CANMC = 0x00000000
16.7.4 Interrupts
There are two different types of interrupts. One type of interrupt is a mailbox related interrupt, for example, the
receive-message-pending interrupt or the abort-acknowledge interrupt. The other type of interrupt is a system
interrupt that handles errors or system-related interrupt sources, for example, the error-passive interrupt or the
wake-up interrupt. See
The following events can initiate one of the two interrupts:
• Mailbox interrupts
– Message reception interrupt: a message was received
– Message transmission interrupt: a message was transmitted successfully
– Abort-acknowledge interrupt: a pending transmission was aborted
– Received-message-lost interrupt: an old message was overwritten by a new one (before the old message
was read)
– Mailbox timeout interrupt (eCAN mode only): one of the messages was not transmitted or received within
a predefined time frame
• System interrupts
– Write-denied interrupt: the CPU tried to write to a mailbox but was not allowed to
– Wake-up interrupt: this interrupt is generated after a wake up
– Bus-off interrupt: the CAN module enters the bus-off state
– Error-passive interrupt: the CAN module enters the error-passive mode
– Warning level interrupt: one or both error counters are greater than or equal to 96
– Time-stamp counter overflow interrupt (eCAN only): the time-stamp counter had an overflow
Controller Area Network (CAN)
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
TMS320x2806x Microcontrollers
1017
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......