How to switch off and on CAN interrupt in S32K1xx

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

How to switch off and on CAN interrupt in S32K1xx

553 Views
Maciek
Contributor V

Hi,

till now we have been using the CAN driver without a need for data integrity protection between CAN ISR and the PIT timer ISR (which has a model_step()). Currently we have an application where there are critical messages received and we have to protect the received data.

With hand-written code (and without RTOS), after receiving CAN message, we would set global (volatile) variables in higher priority (i.e. 'lower priority number' in ARM) CAN ISR but in the lower priority main() we would temporarily switch off the CAN receive interrupt only to read the volatile variable in a safe way (to prevent the CAN ISR to change/damage the currently read variable). This is typical and simple way of protecting data while passing it from peripheral ISR to model_step().

How to do the same using S32K1xx MBDT ?

Thanks

Maciek

0 Kudos
0 Replies