How to switch off and on CAN interrupt in S32K1xx

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to switch off and on CAN interrupt in S32K1xx

750 次查看
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 项奖励
回复
0 回复数