| Electronic Components Datasheet Search |
|
AN4067 Datasheet(PDF) 23 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4067 Datasheet(HTML) 23 Page - STMicroelectronics |
|
23 / 27 page ![]() DocID022913 Rev 2 23/27 AN4067 Low-speed internal oscillator measurement 26 Figure 15. Timing diagram of an internal RC oscillator measurement The internal oscillator frequency value is computed as shown by the following formula: internal oscillator frequency = HSI_Value / Capture where: HSI_Value is the HSI frequency value: typical value is 8 MHz, Capture represents an entire period of internal RC oscillator LSI: IC1ReadValue2 - IC1ReadValue1. As users can conclude from the formula above, the frequency measurement accuracy depends on the HSI frequency accuracy. Consequently, if a reference signal is available, users can run the internal RC oscillator calibration routine described in Section 3: Internal RC oscillator calibration before performing the internal RC oscillator measurement procedure. The input capture prescaler can be used for better measurement accuracy so the formula above becomes: LSI_Frequency = InputCapturePrescaler * HSI_Value / Capture_Value. Note: If the HSE clock is available it is highly recommended to use it as the reference clock instead of HSI, to benefit from its higher accuracy. 4.2 Description of the internal oscillator measurement firmware The internal oscillator measurement firmware provided with this application note includes one C source files: LSIMeasurement.c performing LSI frequency measurement using LSI_FreqMeasure() function The internal RC oscillator LSI is measured for a predefined number of periods. Then it returns the average value to minimize the error of the measured frequency. Users can change this parameter (number of LSI periods) in the lsi_measurement.h file: #define LSI_PERIOD_NUMBERS 10 |
|
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 |