FlexCAN RX FIFO with Extended 29-Bit CAN IDs not Working

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

FlexCAN RX FIFO with Extended 29-Bit CAN IDs not Working

Jump to solution
4,454 Views
gbrowne
Contributor II

Hello.

I have run tests on the S32K144 with sending and receiving both standard (11-bit) and extended (29-bit) ID CAN frames.  What I have found is that I cannot receive extended ID frames when I use the RX FIFO, but I can receive standard ID frames.

Also, I can receive both standard and extended ID frames if I receive into a specific message buffer (i.e. the non-FIFO method).

So, is there something special to setting the RX FIFO to receive extended ID frames?  Is there working sample code for receiving extended ID frames with the RX FIFO?

Here is a general overview of my routines:

RX FIFO Routine (which only works for standard 11-bit ID frames):

FLEXCAN_DRV_Init(...)

FLEXCAN_DRV_SetRxMaskType(...)

FLEXCAN_DRV_SetRxFifoGlobalMask(...)

FLEXCAN_DRV_ConfigRxFifo(...)

FLEXCAN_DRV_ConfigTxMb(...)

FLEXCAN_DRV_Send(...)

FLEXCAN_DRV_RxFifoBlocking(...)

Specific Message Buffer Routine (which works for both standard 11-bit and extended 29-bit ID frames):

FLEXCAN_DRV_Init(...)

FLEXCAN_DRV_SetRxMaskType(...)

FLEXCAN_DRV_SetRxMbGlobalMask(...)

FLEXCAN_DRV_ConfigRxMb(...)

FLEXCAN_DRV_ConfigTxMb(...)

FLEXCAN_DRV_Send(...)

FLEXCAN_DRV_ReceiveBlocking(...)

Any insights would be much appreciated.

Thanks!

-Greg

1 Solution
3,130 Views
AnaAldescu
NXP Employee
NXP Employee

Hello Greg,

There is a known bug related to the Rx FIFO filters. If you're using other filter format than format A, extended ID's won't match the filter. This bug will be fixed in the next S32 SDK release.

If you're using format A for the ID filters, please make sure you configure the ID filter table with extended IDs:

flexcan_id_table_t filterTable[8U];

filterTable[0].id = 0x1FFFFFFF;
filterTable[0].isExtendedFrame = true;

FLEXCAN_DRV_ConfigRxFifo(INST_CANCOM1, FLEXCAN_RX_FIFO_ID_FORMAT_A, filterTable);

Please let me know if the problem is not solved.

Best regards,

Ana

View solution in original post

2 Replies
3,131 Views
AnaAldescu
NXP Employee
NXP Employee

Hello Greg,

There is a known bug related to the Rx FIFO filters. If you're using other filter format than format A, extended ID's won't match the filter. This bug will be fixed in the next S32 SDK release.

If you're using format A for the ID filters, please make sure you configure the ID filter table with extended IDs:

flexcan_id_table_t filterTable[8U];

filterTable[0].id = 0x1FFFFFFF;
filterTable[0].isExtendedFrame = true;

FLEXCAN_DRV_ConfigRxFifo(INST_CANCOM1, FLEXCAN_RX_FIFO_ID_FORMAT_A, filterTable);

Please let me know if the problem is not solved.

Best regards,

Ana

3,130 Views
gbrowne
Contributor II

Ah, much appreciated Ana!

I was missing that extra isExtendedFrame flag in the filter table.

Thanks!

-Greg

0 Kudos
Reply