projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/stmf0: Leave power interface disabled until needed
[fw/altos]
/
src
/
stmf0
/
ao_arch_funcs.h
diff --git
a/src/stmf0/ao_arch_funcs.h
b/src/stmf0/ao_arch_funcs.h
index a0c6e08876cbb012e350b18dc585e02346db9c7c..591ca8a07576fb01a2888754d5f372fc9ab0ac47 100644
(file)
--- a/
src/stmf0/ao_arch_funcs.h
+++ b/
src/stmf0/ao_arch_funcs.h
@@
-458,6
+458,9
@@
static inline void ao_sleep_mode(void) {
ao_arch_block_interrupts();
ao_arch_block_interrupts();
+ /* Enable power interface clock */
+ stm_rcc.apb1enr |= (1 << STM_RCC_APB1ENR_PWREN);
+ ao_arch_nop();
stm_scb.scr |= (1 << STM_SCB_SCR_SLEEPDEEP);
ao_arch_nop();
stm_pwr.cr |= (1 << STM_PWR_CR_PDDS) | (1 << STM_PWR_CR_LPDS);
stm_scb.scr |= (1 << STM_SCB_SCR_SLEEPDEEP);
ao_arch_nop();
stm_pwr.cr |= (1 << STM_PWR_CR_PDDS) | (1 << STM_PWR_CR_LPDS);