From 8a8bcb865e60d6e461f8a96edbd46f9d8801ed15 Mon Sep 17 00:00:00 2001 From: Igor Biletksyy Date: Wed, 28 Jun 2023 12:39:47 -0700 Subject: [PATCH] H7: clear irqs on reset --- board/stm32h7/llfdcan.h | 1 + 1 file changed, 1 insertion(+) diff --git a/board/stm32h7/llfdcan.h b/board/stm32h7/llfdcan.h index 60dc0da7..0382e8ce 100644 --- a/board/stm32h7/llfdcan.h +++ b/board/stm32h7/llfdcan.h @@ -263,6 +263,7 @@ bool llcan_init(FDCAN_GlobalTypeDef *CANx) { void llcan_clear_send(FDCAN_GlobalTypeDef *CANx) { // from datasheet: "Transmit cancellation is not intended for Tx FIFO operation." // so we need to clear pending transmission manually by resetting FDCAN core + CANx->IR |= 0x3FCFFFFFU; // clear all interrupts bool ret = llcan_init(CANx); UNUSED(ret); }