Enabling/Disabling the FlexCAN interrupt leads to loss of messages

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

Enabling/Disabling the FlexCAN interrupt leads to loss of messages

604 Views
superbird
Contributor I

Hi, 

I have a strange behavior on my target device (S32K144) with RTD FlexCAN Driver (V1.0.1) with Legacy RxFifo.
Inside the callback function I store the received messages in a receive queue for later processing. While processing the data (outside the IRQ context), I have to disable the reception of further CAN messages for a very limited time (to ensure that the queue is not corrupted).
To disable/enable the FlexCAN interrupt, I use the RTD driver functions FlexCAN_Ip_DisableInterrupts()/FlexCAN_Ip_EnableInterrupts().
However, I have noticed that some messages are then lost. This does not happen when I use SuspendAllInterrupts()/ResumeAllInterrupts().
Does anyone have any idea why this is the case? Thanks for any help.

0 Kudos
Reply
1 Reply

588 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi superbird,

Please check if the RTD driver functions FlexCAN_Ip_DisableInterrupts()/FlexCAN_Ip_EnableInterrupts() change the value of IMASK1.

FlexCAN_Ip_DisableInterrupts.png

Best Regards,
Robin

0 Kudos
Reply