WeActStudio / WeActStudio.MiniSTM32F4x1

MiniF4-STM32F401CEU6/STM32F411CEU6 Product Literature
685 stars 153 forks source link

Bug with ST32F411CEU6 V3.1 in arduino programming, Platformio and STM32LowPower lib (STM32duino Low Power) #38

Open sfekilou opened 2 years ago

sfekilou commented 2 years ago

With Black Pill ST32F411CEU6, arduino coding, platformio

If the code is: `` void setup() { pinMode(LED_BUILTIN, OUTPUT); }

void loop() { digitalWrite(LED_BUILTIN, HIGH); delay(1000); digitalWrite(LED_BUILTIN, LOW); delay(1000); } ``

The LED is blinking.

But if the code is: `

include //Last STM32duino Low Power lib

void setup() { pinMode(LED_BUILTIN, OUTPUT); LowPower.begin(); }

void loop() { digitalWrite(LED_BUILTIN, HIGH); LowPower.deepSleep(2000); digitalWrite(LED_BUILTIN, LOW); LowPower.deepSleep(2000); } ` The LED does not blinking What is the problem ? Do you know a method to perform a deepsleep ?