Skip to content

Commit

Permalink
stm32/stm32_it: Enable PVD_PVM_IRQHandler for WB and WL MCUs.
Browse files Browse the repository at this point in the history
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 micropython#15548.

Signed-off-by: Andrew Leech <[email protected]>
  • Loading branch information
pi-anl authored and dpgeorge committed Aug 20, 2024
1 parent 5e8d35a commit 185116e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ports/stm32/stm32_it.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 185116e

Please sign in to comment.