From 185116ea4139e84e7f7afb27d52b14dc03f0c2a8 Mon Sep 17 00:00:00 2001 From: Andrew Leech Date: Wed, 14 Aug 2024 12:04:11 +1000 Subject: [PATCH] stm32/stm32_it: Enable PVD_PVM_IRQHandler for WB and WL MCUs. There is a gap in support for the PVD interrupt on STM32WBxx and STM32WLxx. This has been tested on NUCLEO_WB55 with the example code: from pyb import Pin, ExtInt def callback(line): print(line) PVD = 16 exti = ExtInt(PVD, ExtInt.IRQ_RISING_FALLING, Pin.PULL_DOWN, callback) exti.swint() Before this commit the CPU locks up as soon as the final line is run. After this commit it prints "16". Fixes issue #15548. Signed-off-by: Andrew Leech --- ports/stm32/stm32_it.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/stm32/stm32_it.c b/ports/stm32/stm32_it.c index bc1feceb9c..a910a624be 100644 --- a/ports/stm32/stm32_it.c +++ b/ports/stm32/stm32_it.c @@ -514,7 +514,7 @@ void PVD_IRQHandler(void) { IRQ_EXIT(PVD_IRQn); } -#if defined(STM32L4) +#if defined(STM32L4) || defined(STM32WB) || defined(STM32WL) void PVD_PVM_IRQHandler(void) { IRQ_ENTER(PVD_PVM_IRQn); Handle_EXTI_Irq(EXTI_PVD_OUTPUT);