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.
Dependents: SANFAN_read_analog_value nucleo-wdg Nucleo_sleep_copy
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/sleep.c
- Revision:
- 139:e3413eddde57
- Parent:
- 84:f54042cbc282
- Child:
- 174:8bb9f3a33240
diff -r ec7ee4660c49 -r e3413eddde57 targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/sleep.c
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/sleep.c Tue Mar 25 17:45:07 2014 +0000
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/sleep.c Thu Mar 27 09:45:07 2014 +0000
@@ -30,6 +30,9 @@
#include "sleep_api.h"
#include "cmsis.h"
+// This function is in the system_stm32f10x.c file
+extern void SetSysClock(void);
+
void sleep(void)
{
// Disable us_ticker update interrupt
@@ -53,6 +56,9 @@
// Request to enter STOP mode with regulator in low power mode
PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI);
+ // After wake-up from STOP reconfigure the PLL
+ SetSysClock();
+
// Re-enable us_ticker update interrupt
TIM_ITConfig(TIM1, TIM_IT_Update, ENABLE);
}
