NUCLEO-L452RE-P deep sleep doesn't work
andreax64 opened this issue · comments
LowPower.deepSleep doesn't work for me. It doesn't stop, execute the method and continue immediately no matter the value of "uint32_t ms". But LowPower.sleep() and LowPower.shutdown() work fine.
Below is the simple script with the details of the development environment.
Any suggestions?
#include "Arduino.h"
#include "STM32LowPower.h"
void setup() {
// LED_BUILTIN is PB13 on NUCLEO-L452RE-P
pinMode(PB13, OUTPUT);
delay(200);
LowPower.begin();
}
void loop() {
digitalWrite(PB13, HIGH);
LowPower.deepSleep(5000);
digitalWrite(PB13, LOW);
LowPower.deepSleep(5000);
}
Device: NUCLEO-L452RE-P
Environment:
Ubuntu 22 X64
CLion 2023.1.4
PlatformIO Core, version 6.1.9
stm32duino/STM32duino Low Power 1.2.4
[env:nucleo_l452re]
platform = ststm32
board = nucleo_l452re
framework = arduino
lib_deps = stm32duino/STM32duino Low Power @ ^1.2.4
Hi @andreax64
I've tested and works as expected.
Seems you used PIO, we do not support it. Anyway, your config seems weird. You talk about NUCLEO-L452RE-P but your config seems to be for NUCLEO-L452RE (note the missing "-P") which is not the same board.
Nevertheless using Arduino IDE it works as expected and no need to use the PB13 as LED_BUILTIN is properly set to PB13 for NUCLEO-L452RE-P.