mirror of https://github.com/ARMmbed/mbed-os.git
handle HSE-PLL enabled upone deepsleep wakeup
parent
11bfe693b9
commit
bc84c03a37
5
libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L1/TARGET_MOTE_L152RC/system_stm32l1xx.c
Normal file → Executable file
5
libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32L1/TARGET_MOTE_L152RC/system_stm32l1xx.c
Normal file → Executable file
|
@ -125,7 +125,7 @@
|
|||
*/
|
||||
|
||||
/* Select the clock sources (other than HSI) to start with (0=OFF, 1=ON) */
|
||||
#define USE_PLL_HSE_EXTC (1) /* Use external clock */
|
||||
#define USE_PLL_HSE_EXTC (0) /* Use external clock */
|
||||
#define USE_PLL_HSE_XTAL (1) /* Use external xtal */
|
||||
|
||||
/**
|
||||
|
@ -485,6 +485,9 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
|
|||
RCC_ClkInitTypeDef RCC_ClkInitStruct;
|
||||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
|
||||
if (__HAL_RCC_GET_SYSCLK_SOURCE() == RCC_CFGR_SWS_PLL)
|
||||
return 1; // already on HSE PLL, could occur from deepsleep waking
|
||||
|
||||
/* Used to gain time after DeepSleep in case HSI is used */
|
||||
if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != RESET)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue