Open
Description
The STM has three TX mailboxes. This is a very small buffer for outgoing messages. It is very reasonable for a periodic task to send several messages in rapid succession, faster than the CAN bus can process them.
This is not a bus traffic issue. A slow task which sends 4 diagnostic messages every 1000 ms would cause dropped frames simply because the messages are loaded faster than they can be sent.
I see two solutions:
- Block the
.Send(msg)
call until a mailbox is available - If mailboxes are full, load the message into a secondary buffer. Use interrupts to move it into a mailbox when available.
This SO article may be useful https://electronics.stackexchange.com/a/509241/331923
Metadata
Assignees
Labels
No labels