Electronic Components Datasheet Search
  English  ▼

X  

AN4631 Datasheet(PDF) 19 Page - STMicroelectronics

Part # AN4631
Description  How to calibrate an STM32L0xx internal RC oscillator
PDF  30 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4631 Datasheet(HTML) 19 Page - STMicroelectronics

Back Button AN4631 Datasheet HTML 15Page - STMicroelectronics AN4631 Datasheet HTML 16Page - STMicroelectronics AN4631 Datasheet HTML 17Page - STMicroelectronics AN4631 Datasheet HTML 18Page - STMicroelectronics AN4631 Datasheet HTML 19Page - STMicroelectronics AN4631 Datasheet HTML 20Page - STMicroelectronics AN4631 Datasheet HTML 21Page - STMicroelectronics AN4631 Datasheet HTML 22Page - STMicroelectronics AN4631 Datasheet HTML 23Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 19 / 30 page
background image
DocID027266 Rev 2
19/30
Internal RC oscillator calibration
29
2.3.4
HSI48 calibration
HSI48 can calibrated the same way as HSI16 or MSI. But STM32L0 family implements CRS
(Clock recovery system) that is capable of doing automatic adjustment of oscillator trimming
based on comparison with a selectable synchronization signal.
Internally it implements a 16-bit down/up counter which step by step increments or
decrements TRIM value until it reaches expected frequency value.
The HSI48 calibration using CRS can be run fully automatic. To speed up the process, the
CRS can be used for measurement of the actual error, and set trim value with precalculated
value. This process can repeated once or twice as the curve might not be linear. When
requested frequency is reached automatic calibration can be activated for further smooth
calibration, e.g. compensating temperature changes.
2.3.5
HSI16/MSI frequency measurement
Internal oscillator frequency measurement is performed by Timer 21 capture interrupt. In the
timer TIM21 ISR, an entire period of internal oscillator frequency is computed. The number
of periods to be measured for each trimming value is configurable by the user in the hsi16.c
or msi.c files as follows:
#define HSI16_NUMBER_OF_LOOPS 10 /* Number of periods to be measured
= 10 */
The averaging method is used to minimize frequency error measurements. So, if the
counter of loops reaches NUMBER_OF_LOOPS, the average of all measured frequencies is
computed.
You can easily configure the frequency of the reference source. It is defined in the header
file hsi16.c or msi.c as follows:
•
If the LSE clock is used as the reference frequency, uncomment the line below to make
sure the LSE is configured and internally connected to Timer 21 channel 1:
#define USE_REFERENCE_LSE
•
If the reference frequency is a mains source frequency equal to 50 Hz, then comment
the line above and define the reference frequency as shown below:
#define REFERENCE_FREQUENCY (uint32_t)50 /* The reference
frequency value in Hz */
The computation of the frequency measurements does not depend on the duty cycle of the
source reference signal. It depends on its frequency since the capture 1 interrupt is
configured to occur on every rising edge of the reference signal (refer to Figure 5).
Note:
Figure 12 provides the frequency measurement algorithm.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com