cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4R: Is it possible to go from Low-Power-Run Mode to STOP2-Mode and start in Low-Power-Run-Mode after exiting STOP2-Mode?

crackl1ng
Associate III

Hello STM32-Community,

I'm getting mixed results checking up this question. In the power consumption calculator (PCC) there is the following diagram displayed:0693W00000JOq99QAD.pngAs you can see it should not be possible to enter STOP2 from LOWPOWER_RUN. However the sequence generator allows me to use it, even though its red underlined in the sequences:

0693W00000JOq5IQAT.png 

Therefore I wanted to ask, is it possible to enter the STOP2 mode from low power run? And if not, why? I couldn't find an answer to the low-power manual from STM32, as well as the reference manual.

Kind regards

crackl1ng

1 ACCEPTED SOLUTION

Accepted Solutions
Simon.T
ST Employee

Hello @crackl1ng​ ,

Yes you are right. It's not possible to make the transition from LOWPOWER_RUN to STOP2. It's mandatory to pass through the RUN MODE.

Regards,

Simon TALAS

View solution in original post

5 REPLIES 5
Simon.T
ST Employee

Hello @crackl1ng​ ,

Yes you are right. It's not possible to make the transition from LOWPOWER_RUN to STOP2. It's mandatory to pass through the RUN MODE.

Regards,

Simon TALAS

Thank you for your reply.

As it seems it is also not possible to return to LOWPOWER_RUN from STOP1. I've tested it out, but the SystemClock jumps back to 48 MHz. Are there different STOP1-Modes?

Hello @crackl1ng​ 

It could be possible to return in LOWPOWER RUN from stop1. Make sure to have STOPWUCK=0 (register RCC_CFGR) and LPR=1 (RCC_CFGR).

Let me know if it's working.

Regards,

Simon

Hello Simon,

thanks again for your fast reply. Regarding to LPR a little typo might have slipped in. I think you wanted to refer to the PWR_CR1 Register must be set to LPR = 1.

I've tried out your advice. I've entered LPR by slowing down the main clock to 2 MHz and set LPR to 1. Afterwards I checked the RCC_CFGR Bit STOPWUCK. It always stays 0, but I manually also set it to 0 just to be sure.

slow_downClock();
	  HAL_PWREx_EnableLowPowerRunMode();	  
          RCC->CFGR &= ~(0<<15);
	  HAL_PWREx_EnterSTOP1Mode(PWR_SLEEPENTRY_WFI);

I still leave with 48 MHz and have to manually slow down the clock and enter LPR mode. Any faster way to do it?

Kind regards

crackl1ng

 Edit: Made it work, had a slight error in the IRQ Handler of the RTC. Thank you very much Simon for your help!

Yes, before to enter in Low power run you need to select MSI clock and slow down the clock bellow or equal to 2MHz

You're welcome ;)