Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/sleep.c
- Revision:
- 84:f54042cbc282
- Parent:
- 80:66393a7b209d
- Child:
- 100:0412b5443284
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/sleep.c Fri Jan 31 10:15:06 2014 +0000
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/sleep.c Mon Feb 03 09:30:05 2014 +0000
@@ -102,10 +102,17 @@
// MCU SLEEP mode
void sleep(void)
{
+ // Disable us_ticker update interrupt
+ TIM_ITConfig(TIM9, TIM_IT_Update, DISABLE);
+
// Enable PWR clock
RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE);
+
// Request to enter SLEEP mode with regulator ON
- PWR_EnterSleepMode(PWR_Regulator_ON, PWR_SLEEPEntry_WFI);
+ PWR_EnterSleepMode(PWR_Regulator_ON, PWR_SLEEPEntry_WFI);
+
+ // Re-enable us_ticker update interrupt
+ TIM_ITConfig(TIM9, TIM_IT_Update, ENABLE);
}
// MCU STOP mode (Regulator in LP mode, LSI, HSI and HSE OFF)
