eCAN Registers
www.ti.com
830
SPRUI07–March 2020
Submit Documentation Feedback
Copyright © 2020, Texas Instruments Incorporated
Controller Area Network (CAN)
13.8.19.2 CPU Mailbox Access
Write accesses to the identifier can only be accomplished when the mailbox is disabled (CANME[n]
(CANME.31-0) = 0). During access to the data field, it is critical that the data does not change while the
CAN module is reading it. Hence, a write access to the data field is disabled for a receive mailbox.
For send mailboxes, an access is usually denied if the TRS (TRS.31-0) or the TRR (TRR.31-0) flag is set.
In these cases, an interrupt can be asserted. A way to access those mailboxes is to set CDR (CANMC.8)
before accessing the mailbox data.
After the CPU access is finished, the CPU must clear the CDR flag by writing a 0 to it. The CAN module
checks for that flag before and after reading the mailbox. If the CDR flag is set during those checks, the
CAN module does not transmit the message but continues to look for other transmit requests. The setting
of the CDR flag also stops the write-denied interrupt (WDI) from being asserted.
13.8.19.3 Message-Control Register (MSGCTRL)
For a transmit mailbox, this register specifies the number of bytes to be transmitted and the transmission
priority. It also specifies the remote-frame operation.
NOTE: As part of the CAN module initialization process, all the bits of the MSGCTRLn registers
must first be initialized to zero before proceeding to initialize the various bit fields to the
desired values.
Figure 13-39. Message-Control Register (MSGCTRL)
31 16
Reserved
R-0
15 13 12 8 7 5 4 3 0
Reserved TPL Reserved RTR DLC
R-0 RW-x R-0 RW-x RW-x
LEGEND: RW = Read any time, write when mailbox is disabled or configured for transmission; -n = value after reset; x = indeterminate
Note: The register MSGCTRL(n) can only be written if mailbox n is configured for transmission (CANMD[n] (CANMD.31-0)=0) or if the
mailbox is disabled (CANME[n] (CANME.31-0) =0).
Table 13-35. Message-Control Register (MSGCTRL) Field Descriptions
Bit Field Value Description
31:13 Reserved Reserved
12:8 TPL.4:0 Transmit-priority level. This 5-bit field defines the priority of this mailbox as compared to the other
31 mailboxes. The highest number has the highest priority. When two mailboxes have the same
priority, the one with the higher mailbox number is transmitted. TPL applies only for transmit
mailboxes. TPL is not used in SCC-mode.
7:5 Reserved Reserved
4 RTR Remote-transmission-request bit
1 For receive mailbox: If the TRS flag is set, a remote frame is transmitted and the corresponding
data frame is received in the same mailbox. Once the remote frame is sent, the TRS bit of the
mailbox is cleared by CAN.
For transmit mailbox: If the TRS flag is set, a remote frame is transmitted, but the corresponding
data frame has to be received in another mailbox.
0 No remote frame is requested.
3:0 DLC 3:0 Data-length code. The number in these bits determines how many data bytes are sent or received.
Valid value range is from 0 to 8. Values from 9 to 15 are not allowed.