| Electronic Components Datasheet Search |
|
AN4631 Datasheet(PDF) 21 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4631 Datasheet(HTML) 21 Page - STMicroelectronics |
|
21 / 30 page ![]() DocID027266 Rev 2 21/30 Internal RC oscillator calibration 29 2.3.6 HSI16/MSI calibration using calibration curve Both previous methods (minimal and fixed error) can take quit long because many measurements (32 for HIS when minimal error method used) need to be run. First, for all trimming values, the difference between the corresponding and the requested frequency is measured and stored in a table. It uses in fact the same principle as minimal error method. When it’s later necessary to calibrate internal oscillator function HSI16_CalibrateCurve() measures only once actual frequency and searches in the table appropriate value to compensate the difference. In case of an MSI calibration, the MSI_GetCurve() and MSI_CalibrateCurve() functions should be used instead of HSI16_GetCurve() and HSI16_calibrateCurve() . 2.4 Recommendations on the use of the calibration library 1. If external signal frequency is lower than system clock / 65535, the TIM21 counter prescaler should be used to support low frequencies. 2. If external signal frequency is higher than system clock / 100, TIM21 input capture prescaler (divider) should be used to support high frequencies. 3. It is recommended to stop all application activities before the calibration process, and to restart them after calling the calibration functions. The application therefore has to stop communications, ADC measurements and other processes (except when using the ADC for the calibration, refer to Step 5. below). These processes normally use clock configurations that are different from those used in the calibration process. Otherwise, errors might be introduced in the application: errors while reading/sending frames, ADC reading errors since the sampling time has changed, and so on. 4. The internal RC oscillator calibration firmware uses the following peripherals: Reset and Clock Control (for trimming internal RC oscillators), Timer 21 (for measuring internal RC oscillators). Therefore, it is recommended to reconfigure these peripherals (if used in the application) after running the calibration routine. 5. Real-time calibration vs. temperature can be used when the ambient temperature changes noticeably while the application is running. The internal temperature sensor can be used with the ADC watchdog with two thresholds. Each time an ADC watchdog interrupt occurs, a new calibration process has to be performed and the two thresholds are updated according to the current temperature (this feature is not implemented in the firmware provided with this application note): Threshold_High = CurrentTemperatureValue + TemperatureOffset Threshold_Low = CurrentTemperatureValue – TemperatureOffset 6. It might happen that with change of operation conditions (e.g. surrounding temperature) the calibration curve can change. From this reason it’s recommended to measure from time to time (or when the condition change) again to keep working with correct values. |
|
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 |