We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fba65b commit 2663367Copy full SHA for 2663367
libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/sleep.c
@@ -102,10 +102,17 @@ static void SetSysClock_HSI(void)
102
// MCU SLEEP mode
103
void sleep(void)
104
{
105
+ // Disable us_ticker update interrupt
106
+ TIM_ITConfig(TIM9, TIM_IT_Update, DISABLE);
107
+
108
// Enable PWR clock
109
RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE);
110
111
// Request to enter SLEEP mode with regulator ON
- PWR_EnterSleepMode(PWR_Regulator_ON, PWR_SLEEPEntry_WFI);
112
+ PWR_EnterSleepMode(PWR_Regulator_ON, PWR_SLEEPEntry_WFI);
113
114
+ // Re-ensable us_ticker update interrupt
115
+ TIM_ITConfig(TIM9, TIM_IT_Update, ENABLE);
116
}
117
118
// MCU STOP mode (Regulator in LP mode, LSI, HSI and HSE OFF)
0 commit comments