stm32duino/STM32LowPower

Examples of STM32LowPower for STM32WLE5CCU6

DEDP01 opened this issue · 5 comments

Hello!

I prove the examples (AlarmTimedWakeup, ExternalWakeup and TimeWakeup), the first two examples worked correctly but the last one (TimedWakeup) doesn´t do anything, it only turns on the led and it keeps like that.

The example works correctly or is incompatible or the program has a actualization?

Hi @DEDP01 ,
I tested TimeWakeup example on my Nucleo WL55JC1 and it is working properly, led is toggling every seconds.
My setup:

  • Arduino_Core_STM32 version 2.2.0
  • STM32LowPower version 1.2.0
  • STM32RTC version 1.2.0

MCU STM32WL55JC from my nucleo board is closed to your STM32WLE5CCU6, except that yours is single core.
So it should work on your chip too.

Can you tell us more about your setup ?
which version of the core, and libraries?

I guess you are using variant "Generic WL55CCU", can you confirm ?
By default Generic variants are for boards with only MCU (no led definition, no other external component, ...)
And I guess you have a custom board, thus Generic variant needs to be customized, especially to define which pin to use for the LED (LED_BUILTIN used in the example).
So did you do so ? can you give us details ?
If needed:
https://github.com/stm32duino/wiki/wiki#customization
https://github.com/stm32duino/wiki/wiki/Add-a-new-variant-%28board%29

Can you tell us more about your setup ?

Yes, my setup:

  • STM32 MCU based boards version 2.2.0
  • STM32LowPower version 1.2.0
  • STM32RTC version 1.3.0

I guess you are using variant "Generic WL55CCU", can you confirm ?
No , the variant is Generic WLE5CCUx

Yes, I customized the output, in my case LED_BUILTIN I changed to PB5.

#include "STM32LowPower.h"

void setup() {
  // in  my case the pin is PB5.
  pinMode(PB5, OUTPUT);
  LowPower.begin();
}

void loop() {
  digitalWrite(PB5, HIGH); //only the led keeps on.
  LowPower.deepSleep(1000);
  digitalWrite(PB5, LOW);
  LowPower.deepSleep(1000);
}

Can you check whether after sketch is loaded in Flash, unplug/plug of PowerSupply make a difference ?

I already tried and it still doesn't work

@DEDP01,
I proposed a fix in RTC library: stm32duino/STM32RTC#68
You can test it if you want.