38.5.3 Loading Messages Into Transmit Queue

Loading transmit message objects into the TXQ works similarly to loading message objects into a transmit FIFO. The application must check the CxTXQSTA register to see if there is space in the TXQ. The CxTXQUA registers need to be used instead of the CxFIFOUAy registers to calculate the address to load the message and set the UINC bit (CxTXQCON[8]) to increment the head of the TXQ.

Table 38-7. Transmit Message Object (TXQ and TX FIFO)
Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0 SID[7:0]
1 EID[4:0] SID[10:8]
2 EID[12:5]
3 - - SID11 EID[17:13]
4 FDF BRS RTR IDE DLC[3:0]
5 SEQ[6:0] ESI
6 SEQ[14:7]
7 SEQ[22:15]
8 Transmit Data Byte 0
9 Transmit Data byte 1
10 Transmit Data byte 2
11 Transmit Data byte 3
12 Transmit Data byte 4
13 Transmit Data byte 5
14 Transmit Data byte 6
15 Transmit Data byte 7
…………………………………………………………………………………………………………………………………………………
m-3 Transmit Data byte n-3
m-2 Transmit Data byte n-2
m-1 Transmit Data byte n-1
m Transmit Data byte n

bit 15:11 EID[4:0]: Extended Identifier bits

bit 10-0 SID[10:0]: Standard Identifier bits

bit 15-14 Unimplemented: Read as ‘x

bit 13 SID11: In FD mode, the Standard ID can be Extended to 12 bits using r1 bit

bit 12-0 EID[17:5]: Extended Identifier bits

bit 15-9 SEQ[6:0]: Bits 6-0 of sequence to keep track of transmitted messages in transmit event FIFO bits

bit 8 ESI: Error Status Indicator bit - In CAN to CAN Gateway mode (ESIGM (C1CONH[1]) = 1), the transmitted ESI flag is a “logical OR” of ESI and the Error Passive state of the CAN controller.

In Normal mode, ESI indicates the error status:

1 = Transmitting node is error passive

0 = Transmitting node is error active

bit 7 FDF: FD Frame bit - distinguishes between CAN and CAN FD formats.

bit 6 BRS: Bit Rate Switch bit - selects if data bit rate is switched

bit 5 RTR: Remote Transmission Request bit (not used in CAN FD)

bit 4 IDE: Identifier Extension bit - distinguishes between base and extended format

bit 3-0 DLC[3:0]: Data Length Code bits

bit 15:0 SEQ[22:7]:Bits 22-7 Sequence to Keep Track of Transmitted Messages in Transmit Event FIFO bits

Note:
  1. Data Bytes 0-2: Payload size is configured individually in the PLSIZE[2:0] bits (CxFIFOCONy[31:29]).