38.5.13 Transmit State Diagram
Figure 38-13 describes how messages are queued for transmission. It illustrates
how the most important transmit flags are set and cleared:
- Messages are queued for transmission by setting the TXREQ flag.
- The transmit priority will be determined. The FIFO or TXQ with the highest priority TXPRIx flag will be selected. The index of the TX message in the FIFO or TXQ will be calculated.
- The TX message is pending for transmission.
- Transmission can only start when the bus is Idle.
- A pending transmission can only be aborted before SOF is transmitted.
- During the transmission of a
message, the CAN FD Protocol module checks for the following:
- Loss of arbitration during the arbitration field.
- Transmit errors.
- In case a message of a TX FIFO or the TXQ is transmitted successfully, the TXREQ will only be cleared after all messages of the FIFO are transmitted. After the transmission of any message, the status flags of the FIFO or TXQ are updated. In case STEF (CxCON[19]) is set, the message will be stored into the TEF and a timestamp will be attached if enabled.
- In case arbitration is lost, TXLARB of the TX FIFO or TXQ will be set and the device will switch over to receiving the message (see 38.8 Message Reception).
- In case an error is detected during the transmission of a message, an error frame will be transmitted and the appropriate error flags will be set. Messages will be retransmitted according to 38.5.9 Retransmission Attempts.