AnsweredAssumed Answered

How can I send more than 3 CAN messages in a row using HAL library

Question asked by Jean Paul Talledo Vilela on Oct 7, 2017
Latest reply on Oct 16, 2017 by Valentin

I am using the latest HAL library to transmit CAN messages using interrupts. I am aware of the 3 mailboxes limitation but I would like to know if someone had implemented a queue system that transmit most of the CAN messages.


I tried to follow the HAL_StatusTypeDef HAL_CAN_Transmit_IT(CAN_HandleTypeDef* hcan) function.

So putting counters on every return of this function equals 1 vs the TX interrupt, my counters are not matching.


To enable the TX interrupts, I simply set:


    HAL_NVIC_SetPriority(CAN1_TX_IRQn,3, 0);


Do I need to set another flag? from my understanding, using the HAL_CAN_Transmit_IT will generate an interrupt, is that correct?