dsPIC33/PIC24 Family Reference Manual
DS70005340A-page 70 2018 Microchip Technology Inc.
6.7.2 TRANSMIT PRIORITY OF MESSAGES IN TXQ
Messages in the TXQ are transmitted based on the message ID. The message with the lowest
message ID (highest priority) is transmitted first.
6.7.3 TRANSMIT PRIORITY BASED ON ID
The goal of transmitting CAN messages based on ID is to avoid “Inner Priority Inversion”. If a
low-priority message is waiting to get transmitted due to bus traffic (arbitration), a higher priority
message could be prevented from being transmitted. The TXQ solves this issue by reprioritizing
the messages in the queue based on priority (ID).
6.8 Transmit Bandwidth Sharing
The bandwidth sharing feature works as follows:
• After a successful transmission of a message, the module will remain Idle for n arbitration
bit times before the module attempts to transmit the next message; it suspends the next
transmission.
• After the device has received a message, the module can transmit the next message as
soon as the bus is Idle.
This allows other nodes on the bus to transmit their messages, even though they are of lower
priority.
The number of arbitration bit times between transmissions can be configured using the
TXBWS<3:0> bits (C1CONH<15:12>).
6.9 Retransmission Attempts
The number of retransmission attempts can be configured as follows:
• Retransmission attempts are disabled
• Three retransmission attempts
• Unlimited retransmissions
The retransmission attempts can be restricted by setting RTXAT (C1CONH<0>). The number of
retransmission attempts can be configured individually for each transmit FIFO and the TXQ
using TXAT<1:0> (C1FIFOCONxH<6:5> and C1TXQCONH<6:5>, respectively).
In case RTXAT = 0, unlimited retransmission attempts will be used for all transmit FIFOs and
the TXQ, and TXATx will be ignored.
6.9.1 RETRANSMISSION ATTEMPTS DISABLED
TXREQ will be cleared after the attempt to transmit the message. If the message is not
successfully transmitted due to loss of arbitration or due to an error, TXATIF in the C1FIFOSTAx
or C1TXQSTA register will be set.
6.9.2 THREE RETRANSMISSION ATTEMPTS
In case an error is detected during transmission, the CAN FD Protocol Module will decrement
the number of remaining attempts and try to retransmit the message the next time the bus is
Idle. In case arbitration is lost, the number of remaining attempts will not change. If all
retransmission attempts are exhausted, TXREQ will be cleared and TXATIF in C1FIFOSTAx or
C1TXQSTA will be set.
Before retransmitting the message, the transmit priority will be recalculated. The retransmission
attempts will be reinitialized if a different TX FIFO or TXQ is selected for transmission, or if a
message is received after the last transmission attempt.
6.9.3 UNLIMITED RETRANSMISSIONS
TXREQ will be cleared only after all messages in the TX FIFO or TXQ are successfully transmitted.