cancel
Showing results for 
Search instead for 
Did you mean: 

Difference for stop modes

prudhvichitturi
Associate III

Hello ,

I have used the below to go into stop mode:

  HAL_PWR_EnterSTOPMode( PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI ); /* CPU will be halted here until a wakeup event occurs */
 
in  the above function, what is the difference

PWR_SLEEPENTRY_WFI  & PWR_STOPENTRY_WFI as parameter?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Since the two macros have the same values: 

STTwo32_0-1742211668197.png

using PWR_SLEEPENTRY_WFI with HAL_PWR_EnterSTOPMode() will not be a problem (the function will work as expected with PWR_STOPENTRY_WFI).

Best Regards. 

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
STTwo-32
ST Employee

Hello @prudhvichitturi 

PWR_STOPENTRY_WFI is used as a parameter of the HAL_PWR_EnterSTOPMode() function to enter STOP mode with WFI instruction. But the PWR_SLEEPENTRY_WFI should be used as a parameter for the HAL_PWR_EnterSLEEPMode() function to enter SLEEP mode with WFI instruction. More details are provided on the pages 384 and 385 of the UM1749 Rev7.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

PWR_SLEEPENTRY_WFI  was used HAL_PWR_EnterSTOPMode() , what are the effects when used?

 

Since the two macros have the same values: 

STTwo32_0-1742211668197.png

using PWR_SLEEPENTRY_WFI with HAL_PWR_EnterSTOPMode() will not be a problem (the function will work as expected with PWR_STOPENTRY_WFI).

Best Regards. 

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.