cancel
Showing results for 
Search instead for 
Did you mean: 

deepsleep entry in stm32f0 discovery

Rajat C
Associate
Posted on January 21, 2018 at 18:10

I wanted my STM32f0 discovery board to get into deepsleep mode. Reference manual states â€“ Set SLEEPDEEP in Cortex®-M0 System Control register , I'm unable to find this register. (along with this i need to configure CWUF,PDDS I have done that). Do answer asap.

https://community.st.com/tags♯/?tags=stm32%20stm32cube

 

https://community.st.com/tags♯/?tags=discovery

 

https://community.st.com/tags♯/?tags=stm32f051

 

#stm32f051 #discovery #stm32-stm32cube
1 REPLY 1
Szymon PANECKI
Senior III
Posted on January 22, 2018 at 21:35

Hello,

In order to find the System Control register and SLEEPDEEP bit I browsed PWR (Power conrol) functions in Cube F0 HAL. Below I attach a code of HAL_PWR_EnterSLEEPMode function from stm32f0xx_hal_pwr.c library:

0690X00000609Q3QAI.png

From above code you can see that you need to edit SCB->SCR. Value of SCB_SCR_SLEEPDEEP_Msk I found in core_cm0.h:

0690X00000609SIQAY.png

Regards

Szymon