Browse Source

ble: Add HSE tuning

ble
Andreas Berthoud 5 years ago
parent
commit
c426421552
  1. 10
      nucleo-wb55-ble/Core/Src/stm32wbxx_hal_msp.c

10
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();

Loading…
Cancel
Save