2021-12-05 05:25 AM
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?