| 전자부품 데이터시트 검색엔진 |
|
AN3101 데이터시트(PDF) 20 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3101 데이터시트(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. |
|
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 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 |