File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -263,6 +263,13 @@ void CAN_enqueue_tx(CanMsgTypeDef_t *msg) {
263263 // Immediately drop the message and bump overflow counter if the queue is full
264264 if (xQueueSendToBack (q_tx_can [periph_idx ], msg , 0 ) != pdPASS ) {
265265 can_stats .can_peripheral_stats [periph_idx ].tx_of ++ ;
266+ return ;
267+ }
268+
269+ // Wake the TX task to attempt an immediate send
270+ TaskHandle_t tx_task = getTaskHandle (CAN_tx_update );
271+ if (tx_task != NULL ) {
272+ xTaskNotifyGive (tx_task );
266273 }
267274}
268275
@@ -289,7 +296,6 @@ void CAN_tx_update() {
289296}
290297
291298// FDCAN RX callback - enqueues received messages to the RX queue
292- // This overrides the weak definition in fdcan.c
293299void PHAL_FDCAN_rxCallback (CanMsgTypeDef_t * msg ) {
294300 BaseType_t xHigherPriorityTaskWoken = pdFALSE ;
295301
You can’t perform that action at this time.
0 commit comments