cancel
Showing results for 
Search instead for 
Did you mean: 

SMT32F767 HSI Clock Calibration

TKana.1
Associate III

Hi,

I am having uart baudrate problems while HSI clock as uart source clock. No problem with PCLK as source with the same uart.

 

In Cube IDE (V1.16.0) and F7 software package (V.17.2), I get different values for HSI_CALIBRATION:

Ide gets as 0x10 while register (RCC_CR) has 0x68 as HSI_CALIBRATION. The register also has 0x10 for HSI Trim value, which made me confused:

 

TKana1_0-1722926090116.png

Any pointers which value to use for calibration?

Thanks,

Tim

 

 

12 REPLIES 12
FBL
ST Employee

Hi @TKana.1 

You can measure the output frequency using an oscilloscope or logic analyze with MCO. Then, you can compare this frequency with the expected HSI frequency to determine if any trimming is needed.

After any reset, trim value is set to 16. Increasing this value by 0x01, increase the period of the oscillator by approximately 0.3% on STM32. AN5067 should explain the calibration principles.

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.

Meant self adjust. On every power up or periodic

Tim

 

Oo...you could set lptim1 on HSI clock and generate a signal ITRx  or INT with this, that you measure with any other timer, thats on HSE/PLL clocked .

 

If you feel a post has answered your question, please click "Accept as Solution".