EasyManuals Logo

Microchip Technology dsPIC33 series User Manual

Microchip Technology dsPIC33 series
116 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #72 background imageLoading...
Page #72 background image
dsPIC33/PIC24 Family Reference Manual
DS70005340A-page 72 2018 Microchip Technology Inc.
6.13 Transmit State Diagram
Figure 6-1 describes how messages are queued for transmission. It illustrates how the most
important transmit flags are set and cleared:
1. Messages are queued for transmission by setting the TXREQ flag.
2. 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.
3. The TX message is pending for transmission.
4. Transmission can only start when the bus is Idle.
5. A pending transmission can only be aborted before SOF is transmitted.
6. During the transmission of a message, the CAN FD Protocol Module checks for the
following:
a) Loss of arbitration during the arbitration field.
b) Transmit errors.
7. 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
(C1CONH<3>) is set, the message will be stored into the TEF and a timestamp will be
attached if enabled.
8. 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 Section 9.0 “Message Reception).
9. 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 Section 6.9 “Retransmission Attempts”.
Figure 6-1: Transmit State Diagram
Yes
No
No
RX Done
Abort: Set ABAT
Yes
No
Success
Yes
Error
Lost Arbitration
Abort: Clr TXREQ[Index]
Any TXREQ
Bus Idle & Waited for Suspend Time
IDLE
Calculate
TX Priority
Result: Index
TX
Pending[Index]
Wait for
Suspend Time
TX In Progress
SOF
Transmit[Index]
TX ERR
Set TXERRIF Flag
TX Attempts--
TX Successful
Set TXIF[Index]
Clr TXREQ[Index]
c
STEF = 1?
Safe Msg to TEF
TX ABORT
Set
TXABT[Index]
ABORT ALL
Clr All TXREQ
Set All TXABT
Lost Arbitration
Set
TXLARB[Index]
Clr TXREQ[Index]
Set
TXATIF[Index]
RX Message
c
TX Attempts Exhausted?
Re-Init TX
Attempts
Based on New
Index
c
New TX Index or
Received a Message?

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Microchip Technology dsPIC33 series and is the answer not in the manual?

Microchip Technology dsPIC33 series Specifications

General IconGeneral
BrandMicrochip Technology
ModeldsPIC33 series
CategoryMotherboard
LanguageEnglish

Related product manuals