From 89d42c004eebd6d9b7bc50487d07c56ba20abc30 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Wed, 30 Sep 2026 16:53:36 +0800 Subject: [PATCH] xspiloader: Avoid spurious TIM12 interrupts When the timer is enabled, interrupts will continue after the payload boots, causing spurious interrupts (unless TIM12 is reconfigured by the booted program). That would result in hitting DefaultHandler after the program runs. xspiloader doesn't need embassy-time, so don't enable any time driver. TIM12 is the default timer driver interrupt. This doesn't affect usbnvme since that uses embassy-time and configures TIM12. It could affect other programs loaded by xspiloader, using newer embassy-stm32 or other configurations. Signed-off-by: Matt Johnston --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 386cbf2..7f1bc36 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-sing cortex-m-rt = { version = "0.7.0", features = ["set-sp", "set-vtor"] } panic-probe = { version = "1", features = ["print-rtt"] } embassy-executor = { version = "0.9", features = ["executor-thread"] } -embassy-stm32 = { version = "0.4", features = ["time-driver-any", "stm32h7s3l8", "unstable-pac", "log"] } +embassy-stm32 = { version = "0.4", features = ["stm32h7s3l8", "unstable-pac", "log"] } [dependencies] embassy-executor = { workspace = true, features = [ @@ -35,7 +35,7 @@ embassy-sync = { workspace = true } embassy-usb = { workspace = true } embassy-usb-driver = { workspace = true } embassy-futures = { workspace = true } -embassy-stm32 = { workspace = true } +embassy-stm32 = { workspace = true, features = ["time-driver-any"] } embassy-usb-synopsys-otg = { version = "0.3" } embedded-hal-async = { workspace = true } heapless = { workspace = true }