From 7d405312503dd3082f8e39fa9d0157af874101ce Mon Sep 17 00:00:00 2001 From: Erick Ahmed Date: Tue, 16 Jun 2026 17:57:35 +0200 Subject: [PATCH] Return instead of critical error - To find a way to handle overflows on the FIFO buffer --- Core/Src/canlog.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/Src/canlog.c b/Core/Src/canlog.c index c5366ca..f7ef964 100644 --- a/Core/Src/canlog.c +++ b/Core/Src/canlog.c @@ -71,7 +71,8 @@ void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan) CAN_RxHeaderTypeDef rxHeader; uint8_t data[8]; - if (HAL_CAN_GetRxMessage(hcan, CAN_RX_FIFO0, &rxHeader, data) != HAL_OK) Error_Handler(); + // TODO: manage the case of FIFO overflow + if (HAL_CAN_GetRxMessage(hcan, CAN_RX_FIFO0, &rxHeader, data) != HAL_OK) return; message.id = rxHeader.ExtId; message.dlc = rxHeader.DLC;