Test setup:
- A single led is connected through a current limiting resistor to PA10, not other peripherals are connected.
- The minimal reproducing code is below (effectively a Blink).
- 2-3 minutes after the power up, the led stops blinking.
- LowPower.sleep(2000) instead of LowPower.deepSleep(2000) works as expected.
- Configuration used for uploading code: Board: "Nucleo-32", Board part number: "Nucleo L412KB"
- To no surprise, trying to connect to the MCU through SWD with STM32CubeProgrammer (I have the SWO pin connected) naturally resets the MCU.
Ideas on how to diagnose this further are much appreciated.
Versions:
- STM32 Core 1.9.0 (did not try 2.0.0 yet)
- STM32duino_Low_Power 1.1.0
- STM32duino_RTC at 1.1.0
- Arduino IDE 1.8.13
Code: Select all
#include <STM32LowPower.h>
void setup() {
pinMode(PA10, OUTPUT);
LowPower.begin();
}
void loop() {
digitalWrite(PA10, HIGH);
LowPower.deepSleep(2000);
digitalWrite(PA10, LOW);
LowPower.deepSleep(2000);
}