This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
THIS IS NOT A DUPLICATE QUESTION!
Reading the technical reference manual, it reads like the dcan fifo is only applicable to 'Receive Objects for Remote Frames', and NOT 'Receive Objects for Data Frames', OR 'Transmit Ojbects'....
Some clarity here would be much appreciated.
27.7.4 Configuration of a Single Receive Object for Remote Frames
Figure 27-11 shows how a Receive Object for Remote Frames can be initialized.
Figure 27-11. Initialization of a Single Receive Object for Remote Frames
MsgVal Arb Data Mask EoB Dir NewDat MsgLst RxIE TxIE IntPnd RmtEn TxRqst
1 appl. appl. appl. 1 1 0 0 appl. 0 0 0 0
Receive Objects for Remote Frames may be used to monitor Remote Frames on the CAN bus. The
Remote Frame stored in the Receive Object will not trigger the transmission of a Data Frame. Receive
Objects for Remote Frames may be expanded to a FIFO buffer, see Section 27.7.5.
UMask must be set to 1. The Mask bits (Msk[28:0], UMask, MXtd, and MDir bits) may be set to “must-
match” or to “don’t care”, to allow groups of Remote Frames with similar identifiers to be accepted. The Dir
bit should not be masked in typical applications. For details, see Section 27.8.8.
The Arbitration bits (ID[28:0] and Xtd bit) may be given by the application. They define the identifier and
type of accepted received Remote Frames. If some bits of the Mask bits are set to “don’t care”, the
corresponding bits of the Arbitration bits will be overwritten by the bits of the stored Remote Frame. If an
11-bit Identifier (Standard Frame) is used (Xtd = 0), it is programmed to ID[28:18]. In this case, ID[17:0]
can be ignored. When a Remote Frame with an 11-bit Identifier is received, ID[17:0] will be set to 0.
The Data Length Code (DLC[3:0]) may be given by the application. When the Message Handler stores a
Remote Frame in the message object, it will store the received Data Length Code. The data bytes of the
message object will remain unchanged.
If the RxIE bit is set, the IntPnd bit will be set when a received Remote Frame is accepted and stored in
the message object.
27.7.5 Configuration of a FIFO Buffer
With the exception of the EoB bit, the configuration of Receive Objects belonging to a FIFO Buffer is the
same as the configuration of a single Receive Object.
To concatenate multiple message objects to a FIFO Buffer, the identifiers and masks (if used) of these
message objects have to be programmed to matching values. Due to the implicit priority of the message
objects, the message object with the lowest number will be the first message object of the FIFO Buffer.
The EoB bit of all message objects of a FIFO Buffer except the last one have to be programmed to zero.
The EoB bits of the last message object of a FIFO Buffer is set to one, configuring it as the end of the
block.
Hello,
FIFO can be used for RX data frame and TX data frame. Since remote frame doesn't contain data field, FIFO is not used for remote frame, but receive objects for Remote Frames can use a FIFO buffer.
FIFO mode allows you to receive a group of frames with the same ID (or same ID after filtering) and only generate an interrupt to the CPU when the last one comes in. Setup a block of mailboxes with the same identifier and mask. For example, if the most bytes you need to receive in this group is 64, then configure 8 mailboxes with the same identifier and mask. For example let's use mailboxes 1-8. The first 7 (1-7) set EoB (end of buffer) to 0 and RxIE (receive interrupt enable) to 0. On the eighth mailbox set EoB to 1 and RxIE to 1.
Now let's assume that one of the nodes needs to send 24 bytes. It sends the first two frame with EoB=0 and the third frame with EoB=1. The first two frames end up in mailboxes 1 and 2, the third frame ends up in mailbox 8 and generates an interrupt. In the interrupt routine for mailbox 8, since you know it is the end of a FIFO, you start reading from mailbox 1. You must check the NewDat bit of each mailbox as you read it. When you hit mailbox 3, NewDat=0, so you can now skip to mailbox 8 and read the last frame from the group.