cancel
Showing results for 
Search instead for 
Did you mean: 

Using "HAL_CAN_AddTxMessage" from interrupt and main loop

JBond.1
Senior

Hi, I want to be able to add CAN message with "HAL_CAN_AddTxMessage" from interrupt and main loop (loop maybe busy sometimes so I cant send all messages from it). I assume they can collide and override so its not safe to do it from both?

What are my options?

Triggering software interrupt and somehow passing data from interrupt/main loop? (not sure how to pass data as it can be overwritten)

Timer interrupt which always checks if data is needed to be sent every 10ms or so?

0 REPLIES 0