mbed SDK library sources

Fork of mbed-src by mbed official

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Revision:
84:f54042cbc282
Parent:
80:66393a7b209d
--- 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)