diff --git a/system_stm32l1xx.c b/system_stm32l1xx.c --- a/system_stm32l1xx.c +++ b/system_stm32l1xx.c @@ -295,6 +295,8 @@ void SystemCoreClockUpdate (void) * @param None * @retval None */ +uint8_t clock_fail = 0; + static void SetSysClock(void) { __IO uint32_t StartUpCounter = 0, HSEStatus = 0; @@ -374,6 +376,7 @@ static void SetSysClock(void) } else { + clock_fail = 1; // while(1); /* If HSE fails to start-up, the application will have wrong clock configuration. User can add here some code to deal with this error */