Page 1 of 1

STM32LowPower wakeup at interrupt

Posted: Fri Jul 26, 2024 11:51 am
by samuel
Hi,

I'am using the Lib stm32duino/STM32duino Low Power@^1.2.5 (https://github.com/stm32duino/STM32LowPower)

But if I send the STM32 in sleep-mode with LowPower.deepSleep(5000) for 5 seconds it also wakes up at GPIO Interrupt without attachInterruptWakeup(...)

Is that the correct behavior? And if so, is it possible to disable. I don't want to wake it up through a interrupt which is triggered by magnet-switches from a wind speed sensor.

Here a Screencapture of my simple Test-Sketch. If tried it with bluepill (F103CB) and blackpill (F411CE)
Image

Re: STM32LowPower wakeup at interrupt

Posted: Fri Jul 26, 2024 12:51 pm
by fpiSTM
Detach interrupt before sleep then reattach after sleep

Re: STM32LowPower wakeup at interrupt

Posted: Sat Jul 27, 2024 6:33 am
by samuel
OK, thanks for your answer and a logical solution.

But is it possible the (re)attach only when waking up?
I tested it to reattach now in loop. But then it will attach every loop and not only if it wakes up.
I know that it is possible with ESP32. But I couldn't find a soltion for STM32.

And I have still the question, if that is the normal behavior. If so, I think the attachInterruptWakeup() wouldn't have a right to exist!?