This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 6e41066215f arm/stm32h7: Allow PendSV with high-priority interrupts.
6e41066215f is described below

commit 6e41066215f7d46832bcded77e93bed1fc04092e
Author: jsanchez-2g <[email protected]>
AuthorDate: Wed Oct 7 13:39:46 2026 -0500

    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 <[email protected]>
---
 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;
 }
 

Reply via email to