FlexCAN Reception Configuration

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

FlexCAN Reception Configuration

1,303 Views
nitinverma
Contributor III

Hi,

I need strong advice regarding FlexCAN configuration.It seems I have no problem with transmission, but I have huge problems with reception.I am using S32K144 evaluation board.It looks like it receives only one Message Buffer at one time. What I mean is we have to configure MB for a specific ID and after the reception of that Message we can configure other MB with different ID i.e kind of cyclic reception.

 

These are the two API's which I am using for Rx reception 
FLEXCAN_DRV_ConfigRxMb(FSL_CAN, 0UL, &Rx_Info_Cfg, 0x0A);
FLEXCAN_DRV_RxMessageBuffer(FSL_CAN, 0UL, &RXMsgBuffer);
Here you can see that MB0 is configured for ID 0x0A and reception API is called.
Question:
What if I have more than one ID to receive? How these API will be called and configured?

 

My use case is the following:

1. I have 8 ID's for reception and for that MB0 - MB7  are used for reception . Idea is to catch ALL  8 incoming frames(ID type is standard )

2. RXFIFO should NOT be used.

Questions:

1. Is it possible to configure FlexCAN to achieve this behavior?

 

 

 

Labels (1)
0 Kudos
3 Replies

732 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

Per my understanding this SDK driver allows using one TX and one RX message buffer at a time. Thus I think your config cannot be done with this driver.

I can suggest to configure the FlexCAN directly touching module registers. You can refer to this demo code; https://community.nxp.com/thread/433482; modify it to use more MBs for RX function.

BR, Petr

0 Kudos

732 Views
nitinverma
Contributor III

Thanks petr,

I didn't find anything like touching module in datasheet please help how to configure and use this module for Flex CAN.

The link you shared for demo code is not opening,it shows the following error.

pastedImage_1.png

Thanks and BR,

Nitin verma

0 Kudos

732 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

attached is the example I pointed to

BR, Petr

0 Kudos