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 <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2025-03-19 22:14:19 -04:00
parent 4b9add2fc3
commit 8176ba22aa

View file

@ -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);