mirror of https://github.com/ARMmbed/mbed-os.git
Add HSI calibration value
parent
ac02e9452e
commit
d459d87749
|
@ -118,7 +118,7 @@
|
||||||
|
|
||||||
/* Select the clock sources (other than HSI) to start with (0=OFF, 1=ON) */
|
/* 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 (1) /* Use external clock */
|
||||||
#define USE_PLL_HSE_XTAL (1) /* Use external xtal */
|
#define USE_PLL_HSE_XTAL (0) /* Use external xtal */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
@ -420,6 +420,7 @@ uint8_t SetSysClock_PLL_HSI(void)
|
||||||
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; // HSI div 2
|
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; // HSI div 2
|
||||||
RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
|
RCC_OscInitStruct.PLL.PREDIV = RCC_PREDIV_DIV1;
|
||||||
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12;
|
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12;
|
||||||
|
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
|
||||||
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
|
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
|
||||||
return 0; // FAIL
|
return 0; // FAIL
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue