s32k144 CAN Mailbox / Rx fifo

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

s32k144 CAN Mailbox / Rx fifo

1,437 次查看
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 项奖励
回复
1 回复

1,423 次查看
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 项奖励
回复