Skip to main content
DS.4
Senior
May 23, 2021
Solved

HSE optimization

  • May 23, 2021
  • 1 reply
  • 1076 views

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

This topic has been closed for replies.
Best answer by Bubbles

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

1 reply

Bubbles
BubblesBest answer
ST Employee
May 28, 2021

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.