From 8176ba22aa6cca9ad2e470ce927d784281f3f3d7 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 19 Mar 2025 22:14:19 -0400 Subject: [PATCH] stm32: Turn on can.c error interrupts It seems both ERRIE and LECIE must be enabled to get hardware error interrupts. Without this, the rx_error and tx_error reports are likely to always be zero. Signed-off-by: Kevin O'Connor --- src/stm32/can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stm32/can.c b/src/stm32/can.c index 6d35e677..30f8fc90 100644 --- a/src/stm32/can.c +++ b/src/stm32/can.c @@ -333,6 +333,6 @@ can_init(void) armcm_enable_irq(CAN_IRQHandler, CAN_TX_IRQn, 0); if (CAN_RX0_IRQn != CAN_SCE_IRQn) armcm_enable_irq(CAN_IRQHandler, CAN_SCE_IRQn, 0); - SOC_CAN->IER = CAN_IER_FMPIE0 | CAN_IER_ERRIE; + SOC_CAN->IER = CAN_IER_FMPIE0 | CAN_IER_ERRIE | CAN_IER_LECIE; } DECL_INIT(can_init);