From 6e41066215f7d46832bcded77e93bed1fc04092e Mon Sep 17 00:00:00 2001 From: jsanchez-2g Date: Wed, 7 Oct 2026 13:39:46 -0500 Subject: [PATCH] arm/stm32h7: Allow PendSV with high-priority interrupts. With CONFIG_ARCH_HIPRI_INTERRUPT enabled, arm_doirq() dispatches PendSV for deferred processing. The STM32H7 debug handler unconditionally panics on that valid interrupt, preventing normal operation with debug enabled. Guard the panic with CONFIG_ARCH_HIPRI_INTERRUPT, allowing the common interrupt path to finish signal delivery and context switching. Preserve the diagnostic when high-priority interrupts are disabled. Assisted-by: Codex:GPT-6 Signed-off-by: jsanchez-2g --- arch/arm/src/stm32h7/stm32_irq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/src/stm32h7/stm32_irq.c b/arch/arm/src/stm32h7/stm32_irq.c index 83793df160d..7849e017e60 100644 --- a/arch/arm/src/stm32h7/stm32_irq.c +++ b/arch/arm/src/stm32h7/stm32_irq.c @@ -189,9 +189,11 @@ static int stm32_nmi(int irq, void *context, void *arg) static int stm32_pendsv(int irq, void *context, void *arg) { +#ifndef CONFIG_ARCH_HIPRI_INTERRUPT up_irq_save(); _err("PANIC!!! PendSV received\n"); PANIC(); +#endif return 0; }