How to switch off and on CAN interrupt in S32K1xx

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to switch off and on CAN interrupt in S32K1xx

725件の閲覧回数
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 返答(返信)