cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 - Using two RX FIFOs on the same CAN peripheral

GHanj
Visitor

New to CAN here,

Is it possible to configure the same CAN peripheral (CAN1) on an STM32F4 to receive messages from one node in RXFIFO0 and from another node in RXFIFO1?

The reason for this setup is that one of the nodes has a higher priority and I would like to separate the messages accordingly. If this is possible, how should I configure the CAN filter settings to achieve this?

1 REPLY 1
mƎALLEm
ST Employee

Hello @GHanj and welcome to the community.

Yes you can make that separation and configure the CAN peripheral to receive a set of CAN IDs on FIFO0 and the other set of IDs on FIFO1.

This is done in the filter configuration:

The message that was accepted by this filter will be received on FIFO0:

 

  sFilterConfig.FilterFIFOAssignment = CAN_RX_FIFO0;

 

The message that was accepted by this filter will be received on FIFO1:

 

  sFilterConfig.FilterFIFOAssignment = CAN_RX_FIFO1;

 

Hope that answers your question.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.