cancel
Showing results for 
Search instead for 
Did you mean: 

shutdown mode concept question

maryam magdy
Associate II

I read that when entering shutdown and waking up through a wakeup pin, the program restarts. If I enter the shutdown in my main method, doesn't that mean that when my MCU wakeup it will restart and then enter the shutdown again in my main method?

2 REPLIES 2
S.Ma
Principal

Generally speaking, there are various ways to go low power.

Some low power mode stops clocks, some keeps data only in a subspace RAM regions or even backup registers, or none:

Even if the wakeup triggers say a reset, there are system registers to read just after the program restart to figure out the trigger source, being watchdog reset, errors, power on reset, etc...

Geoffrey1
Associate III

It can be a bit hard to figure out the standby/shutdowns. Have a look at RCC_CSR. One other important thing is that the RTC backup domain is not reset when exiting standby or shutdown. You can, for example, park some state information there to help deciphering the reset cause.