cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L031: wake up condition and GPIO output in stop mode

Vu.Andy
Associate III
Posted on May 02, 2018 at 16:59

I have a couple of questions regarding the state of the GPIO output and the wake up condition in stop mode that I could not find in the datasheet.

When the uProcessor is specifically in stop mode,

1. Can it be woken up by the IWDG?  The data sheet mentions various sources such as EXT, ... but nothing mentioned about the IWDG in stop mode.

2. Once the uProcessor enters stop mode, what would happen to the GPIO output?  Will they be in HiZ?  Or they retain their states, either hi or lo, just before going into stop mode?

Thanks.

3 REPLIES 3
Szymon PANECKI
Senior III
Posted on May 02, 2018 at 17:24

Hello Andy,

1)

STM32L0 MCUs embeds two watchodg units: Independent Watchdog (IWDG) and System Window Watchdog (WWDG). Second one, so WWDG, has a capability to generate an interrupt. This interrupt can wake up the MCU from STOP mode.

0690X0000060AwzQAE.png

2)

In STOP mode states of GPIOs outputs remains unchanged. If STM32L0 configured outputs to low states before entering STOP mode, they will remain low in STOP mode. The same with GPIOs set to high state.

Let me also mention, that configuratio of GPIOs remains unchanged. So for example if you configure pull-down or pull-up on the GPIO input, it will be also active in STOP mode.

Regards

Szymon
Posted on May 02, 2018 at 19:35

Thanks for the information.  I was wondering if I can ask another question.  In my previous program, I was using Standby mode which wakes up after an IWDG reset so it would start at main() after woken up.

Due to the change in the schematic, I now has to use Stop Mode for various reason.

My question is once entered Stop Mode, and after woken up from interrupt, the program starts execute from where Stop Mode was entered correct?  And not from start of main()?

Thanks.

Posted on May 02, 2018 at 20:00

Hello Andy,

I confirm your assumption.

  • After waking up from STANDBY mode MCU performs a reset and firmware is executed from the beggining.
  • After waking up from STOP mode MCU resumes execution of firmware, so in other words it starts in the place, where it stopped before entering STOP mode.

Regards

Szymon