Hello all,
I'm trying to configure the FlexCAN in order to use the RX FIFO with interrupts, on a S32K344 eval board (Q172)
The problem is that when I activate the interrupts through the ERFIER register, it seems that the FIFO stops being filled with new messages. Instead, when the ERFIER register is 0 (interrupts disabled), the FIFO gets filled regularly and also the watermark flag is correctly set.
I noticed that there exists the function FlexCAN_Ip_RxFifo which temporarily activates the interrupts, which will then be disabled by the corresponding function FlexCAN_CompleteRxMessageEnhancedFifoData at the end of the reception. But it seems to me that this function reads a message in the FIFO even if the watermark flag is not set; also, it is necessary to call this function in polling to keep getting new reads.
Have I misunderstood something in the behavior of the driver?
Thank you to everyone that will help me
Stefano