| Electronic Components Datasheet Search |
|
AN3101 Datasheet(PDF) 8 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3101 Datasheet(HTML) 8 Page - STMicroelectronics |
|
8 / 24 page ![]() High speed internal oscillator calibration AN3101 8/24 DocID16612 Rev 6 2.1 Calibration principle The calibration principle consists in • first measuring the HSI frequency for many calibration values, then • computing the frequency error for each calibration value, and • finally setting the HSITRIMR register with the optimum value. The HSI frequency is not measured directly but it is estimated from the number of counted HSI clock pulses using a timer compared with the typical value (16 MHz). To do so, a very accurate reference frequency must be available such as the LSE frequency provided by the external 32.768 kHz crystal or the 50 Hz/60 Hz of the mains (refer to Section 2.2.2: Case where another source is used as the reference frequency). Figure 3 shows how the reference signal period is measured in number of timer counts. Figure 3. Timing diagram of HSI calibration After enabling the timer counter, when the first rising edge occurs, the timer counter value is registered in IC1ReadValue1. At the second rising edge, the timer counter is captured in IC1ReadValue2. The elapsed time between two consecutive rising edges (IC1ReadValue2 and IC1ReadValue1) represents an entire period of the reference signal. Since the timer is clocked by the internal HSI oscillator, the microcontroller can compute the real frequency generated by the HSI versus the reference signal (frequencyREF) . The error (in Hz) is computed as the absolute value of the difference between the measured HSI frequency (FrequencyHSI) and 16 MHz, hence the HSI frequency error is given by After calculating the error for each calibration value, the algorithm determines the optimum calibration value (the nearest value to 16 MHz) to be programmed in the HSITRIMR register (refer to Section 2.3 for more details). frequencyHSI IC1ReadValue2 IC1ReadValue1 – () frequencyREF × = Error Hz () frequencyHSI 16000000 – = |
|
|
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 |
| 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 |