stm32duino/STM32LowPower

WKUP pin for shutdown mode

King-anderson opened this issue · 2 comments

Hi friends,
I want to wake up the micro-controller from shutdown mode using WKUP pin (PA0). is there anyway to do it in this repository approach?

Hi @msadeghz ,
yes, use the attachInterruptWakeup, usually PA0 is SYS_WKUP0:

  // Configure low power
  LowPower.begin();

  LowPower.attachInterruptWakeup(SYS_WKUP0, NULL, RISING);
  ...
  LowPower.shutdown();

OK, got it.
thank you