s32k144 CAN Mailbox / Rx fifo

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

s32k144 CAN Mailbox / Rx fifo

1,189 Views
SW_Park
Contributor II

hi.

I am implementing CAN communication and plan to use MailBox and RX FIFO together.
Some messages are stored in a mailbox with a fixed ID.
However, I want to group non-fixed message IDs (about 127), put them in the RX FIFO, and retrieve them sequentially from CallBack, but an error occurs in the configuration as shown below.
When setting up RX FIFO, it seems that Mailbox is used. I'm curious what the structure is like.
Also, please check how to receive 127 message IDs as RX FIFO.

SW_Park_1-1712297840995.png

 

    for(uLoop_u8=0;uLoop_u8<128;uLoop_u8++)

    {
        filterTable[uLoop_u8].isRemoteFrame = false;
        filterTable[uLoop_u8].isExtendedFrame = false;
        filterTable[uLoop_u8].id = uLoop_u8 + cBASE_BM_MSG_ID;
    }
     -> If set as above, it did not enter the buffer.
 
0 Kudos
Reply
1 Reply

1,175 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes, when RXFIFO is enabled number of available MBs decreases. See more in chapters 55.5.6 Rx FIFO structure and 55.5.2.12 Control 2 Register (CTRL2) of the device RM. Some words from there...

When MCR[RFEN] is set, the memory area 80h–DCh (which is normally occupied by MBs 0–5) is used by the reception FIFO engine.
An additional memory area, which starts at E0h and may extend up to 2DCh (normally occupied by MBs 6–37) depending on the CTRL2[RFFN] field setting, contains the ID filter table (configurable from 8 to 128 table elements).

As FlexCAN0 has up to 32MBs then there is not possible to have 128 filter elements in RXFIFO table using Format A, max is 104. But you can config filters in Format B, which doubles number of IDs.

BR, Petr

0 Kudos
Reply