2020-09-24 04:51 PM
I'm currently using the stm32f413zh, and face perhaps a general problem where I'd like to send four CAN messages right after each other. If we refer to the image below, I have four "addtxCAN" commands below and only able to see the first three. When I'm live debugging, and slowly go to each statement, the fourth one shows. I understand that there's three canTX mailboxes for this board and curious if others have had a similar issue or ways that they can deal with a packet of can messages in respect to the TX buffer.
Some methods I can think of:
1.Delays can work, however I don't want to use a HAL_delay which could not be ideal for the whole MCU running other tasks.
2.Some type of sequential function that puts these CAN messages at an order to send
3.A FIFO buffer to deal with CAN messages called into to deal with, and then send out.
However, I can't think of an ideal way in which I would like to have some delay and send out a lot of CAN messages at the same time without bottlenecking the system itself. Any tips or advice would be greatly appreciated! =)