| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
AN3101 bảng dữ liệu(PDF) 20 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3101 bảng dữ liệu(HTML) 20 Page - STMicroelectronics |
|
20 / 24 page ![]() Low speed internal oscillator measurement AN3101 20/24 DocID16612 Rev 6 Figure 12. Timing diagram of LSI measurement The LSI frequency value is computed as shown by the following formula: LSI_Frequency = HSI_Value / Capture where: • HSI_Value is the HSI frequency value (typically 16 MHz); • Capture represents an entire LSI period: IC1ReadValue2 - IC1ReadValue1. As you can conclude from the formula above, the LSI measurement accuracy depends on the HSI frequency accuracy. Consequently, if an external reference signal is available, the user can run the HSI calibration routine described in Section 2 before performing the LSI measurement procedure in order to get a more accurate HSI_Value. The Input capture divider (or prescaler) can be used for better measurement accuracy. In this case, the formula above becomes: LSI_Frequency = InputCaptureDivider * HSI_Value / Capture_Value. 3.2 Description of the LSI clock measurement firmware The LSI clock measurement firmware provided with this application note includes one major function: LSI_FreqMeasure(void). The LSI_FreqMeasure() function measures the LSI frequency value. It measures a predefined number of LSI periods. Then it returns the average value to minimize the error of measured frequency. The user can change this parameter (number of LSI periods) in the lsi_measurement.h file. #define LSI_PERIOD_NUMBERS 10 By default, the number of measured periods per frequency is set to 10. To start the LSI measurement, save the user clock configuration and set the system configuration for LSI measurement (select the HSI clock as system clock, configure Timer 2 channel 1 in input capture mode, connect LSI to Timer 2 channel 1...). After system configuration, Timer 2 counter and capture 1 interrupt are enabled. This makes it possible to save the captured values for the predefined number of LSI periods. Once the measurement is performed, the average value is computed and returned after restoring the system clock configuration. Figure 13 gives the flowchart of the LSI measurement. |
|
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất 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 |