STM32LowPower wakeup at interrupt

Post here first, or if you can't find a relevant section!
Post Reply
samuel
Posts: 2
Joined: Fri Jul 26, 2024 10:12 am

STM32LowPower wakeup at interrupt

Post 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
fpiSTM
Posts: 1951
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 109
Location: Le Mans
Contact:

Re: STM32LowPower wakeup at interrupt

Post by fpiSTM »

Detach interrupt before sleep then reattach after sleep
samuel
Posts: 2
Joined: Fri Jul 26, 2024 10:12 am

Re: STM32LowPower wakeup at interrupt

Post 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!?
Post Reply

Return to “General discussion”