diff --git a/nucleo-wb55-ble/Core/Src/stm32wbxx_hal_msp.c b/nucleo-wb55-ble/Core/Src/stm32wbxx_hal_msp.c index afec4dc..b853f27 100644 --- a/nucleo-wb55-ble/Core/Src/stm32wbxx_hal_msp.c +++ b/nucleo-wb55-ble/Core/Src/stm32wbxx_hal_msp.c @@ -22,7 +22,7 @@ /* Includes ------------------------------------------------------------------*/ #include "main.h" /* USER CODE BEGIN Includes */ - +#include "otp.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ @@ -64,7 +64,15 @@ void HAL_MspInit(void) { /* USER CODE BEGIN MspInit 0 */ + OTP_ID0_t * p_otp; + /* + * Read HSE_Tuning from OTP + */ + p_otp = (OTP_ID0_t *) OTP_Read(0); + if (p_otp) { + LL_RCC_HSE_SetCapacitorTuning(p_otp->hse_tuning); + } /* USER CODE END MspInit 0 */ __HAL_RCC_HSEM_CLK_ENABLE();