cancel
Showing results for 
Search instead for 
Did you mean: 

HSE optimization

DS.4
Senior II

Hi,

Using the P NUCLEO WB 55 with STM32WB .

Encountered with below code, regarding HSE tuning, in workshop tutorial.

A reference was given to An5024.

This code does not exist in my example project, BLE Heart Rate RTOS,

generated with STM32Cube 6.2.0 , FW_WB V1.11.0.

Should I add it manually?

Will this benefit my current working environment above?

Code:

/* 1 */
 
#include "otp.h"
 
/* 2 */
 
#warning “Following code is valid only for P-NUCLEO-WB55 boards and should be reimplemented depending on the target HW and HSE capacitor tuning value storage location.“
 
OTP_ID0_t * p_otp;
 
 
 
/* Read and use HSE_Tuning from OTP */
 
p_otp = (OTP_ID0_t *) OTP_Read(0);
 
if (p_otp)
 
{
 
 LL_RCC_HSE_SetCapacitorTuning(p_otp->hse_tuning);
 
}

0693W00000APKqHQAX.png

1 ACCEPTED SOLUTION

Accepted Solutions
Bubbles
ST Employee

Hello @Community member​ ,

yes, you should add this even if it was not in the CubeMX output.

Actually you should also check the relevant examples from the STM32 Cube Package:

STM32CubeWB - STM32Cube MCU Package for STM32WB series (HAL, Low-Layer APIs and CMSIS, USB, File system, RTOS, BLE, Thread and Zigbee stacks - and examples running on ST boards) - STMicroelectronics

Rgds,

Jarda

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
Bubbles
ST Employee

Hello @Community member​ ,

yes, you should add this even if it was not in the CubeMX output.

Actually you should also check the relevant examples from the STM32 Cube Package:

STM32CubeWB - STM32Cube MCU Package for STM32WB series (HAL, Low-Layer APIs and CMSIS, USB, File system, RTOS, BLE, Thread and Zigbee stacks - and examples running on ST boards) - STMicroelectronics

Rgds,

Jarda

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.