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 #67 background imageLoading...
Page #67 background image
2018 Microchip Technology Inc. DS70005340A-page 67
CAN FD Protocol Module
6.0 MESSAGE TRANSMISSION
The application has to configure the FIFO or TXQ before it can be used for transmission
(see Section 5.4.3 “Transmit FIFO Configuration” and Section 5.4.2 “Transmit Queue
Configuration”).
6.1 Transmit Message Object
Table 6-1 specifies the transmit message object used by the TXQ and the transmit FIFOs. The
transmit objects contain the message ID, control bits and payload.
SID: Standard Identifer or Base Identifier.
EID: Extended Identifier.
DLC: Data Length Code; specifies the number of data bytes to transmit (see Section 2.1.1
“DLC Encoding”).
IDE: Identifier Extension; clearing this bit will transmit a base frame, setting this bit will
transmit an extended frame.
RTR: Remote Transmit Request; this bit is only specified in CAN 2.0 frames. Setting this bit
will request a transmission of a receiving node.
FDF: FD Format; if this bit is set, a CAN FD frame will be transmitted; otherwise, a CAN 2.0
frame will be transmitted. If Normal CAN 2.0 mode is selected, this bit is ignored and only
CAN 2.0 frames are transmitted.
BRS: Bit Rate Switch; the data phase of a CAN FD frame will be transmitted using DBR if
this bit is set. If the bit is clear, the whole frame will be transmitted using NBR.
ESI: Error State Indicator; normally, the ESI bit reflects the error status of the transmitting
node. A recessive ESI bit in a CAN FD frame indicates that the transmitting node is
error passive, a dominant bit shows that the transmitting node is error active. If
ESIGM (C1CONH<1>) = 0, this bit in the object is ignored. If ESIGM = 1, the ESI bit in the
transmitted message will be transmitted recessive if the CAN FD Protocol Module is error
passive, or if the ESI bit in the message object is set. A gateway application would use it to
signal that the ESI bit of the transmitting node is set.
SEQ: Sequence Number; SEQ is not transmitted on the CAN bus. It is used to keep track
of the transmitted messages. SEQ is stored in the TEF message object.
Transmit Buffer Data: contains the payload of the message. Only the number of data
bytes specified by the DLC are transmitted. Byte 0 is transmitted first, followed by 1, 2 and
so on.
6.2 Loading Messages into Transmit FIFO
Before loading a message into the FIFO, the application must ensure that the FIFO is not full.
There is space in the FIFO if TFNRFNIF (C1FIFOSTAx<0>). is set. Loading a message into a full
FIFO can corrupt a message that is being transmitted.
The FIFO user address (C1FIFOUAxH/L) points to the RAM of the next transmit message object
where the application should store the message. T0 of the transmit message object is loaded first,
followed by T1, T2 and so on. The maximum number of data bytes is limited by the configured
payload. Only the number of data bytes specified by the DLC have to be loaded.
After the message object is loaded into RAM, the FIFO needs to be incremented by setting the
UINC bit (C1FIFOCONxL<8>). Doing so will cause the CAN FD Protocol Module to increment
the head of the FIFO and update C1FIFOUAxH/L.
Now the message is ready for transmission and the next message can be loaded at the new
address.

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