stm32/system_stm32: Provide default value for HSI calibration.

If HSI is used the calibration value must be valid.  Fixes #4596.
This commit is contained in:
roland van straten 2019-03-24 20:53:27 +01:00 committed by Damien George
parent 869a8b70ce
commit d396a7e10d
1 changed files with 1 additions and 0 deletions

View File

@ -416,6 +416,7 @@ void SystemClock_Config(void)
RCC_OscInitStruct.OscillatorType = MICROPY_HW_RCC_OSCILLATOR_TYPE;
RCC_OscInitStruct.HSEState = MICROPY_HW_RCC_HSE_STATE;
RCC_OscInitStruct.HSIState = MICROPY_HW_RCC_HSI_STATE;
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
#if defined(STM32H7)
RCC_OscInitStruct.CSIState = RCC_CSI_OFF;
#endif