| Electronic Components Datasheet Search |
|
AN2604 Datasheet(PDF) 10 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2604 Datasheet(HTML) 10 Page - STMicroelectronics |
|
10 / 14 page ![]() Calculating the needed amount of calibration AN2604 - Application note 10/14 2 Calculating the needed amount of calibration To establish how much calibration is required in a given application, a method specially suited to manufacturing environments is retained. It involves the use of the RTC clock output mode, which derives a 512 Hz signal from the clock divider chain as indicated in Figure 2 on page 6. This signal can be used to measure the accuracy of the crystal oscillator. This method can be divided up into the following steps: 1. Enable the low speed external oscillator (LSE), select the LSE as the RTC clock source, then enable the RTC clock. 2. Enable the RTC clock output with a frequency divided by 64, on the ANTI_TAMP pin for crystal frequency measurement. This is achieved by setting the CCO bit in BKP_RTCCR. 3. Calculate the crystal frequency deviation in ppm. The deviation in ppm can be quickly calculated by dividing the measured deviation from 511.968 Hz by 511.968 and, by multiplying the result by 1 million. Find the nearest calibration value using Table 1 on page 7. This table is a direct look-up table for calibration values based upon variation values expressed in ppm. 4. Load the calibration value in the RTC calibration register to compensate for the crystal deviation. Note: To set the RTC prescaler to 32 766, write 32 765 into the RTC prescaler load register. For example, if the frequency measured during the test mode is 511.982 Hz, the delta is 0.014. By dividing by 511.968 and multiplying by 1 million, the result is 27.35 ppm. In this case, the nearest compensation value is 28. The inaccuracy will be reduced from 27.35 ppm (~71 seconds per month) to 0.65 ppm (~1.7 second per month). Note: Since RTC calibration is based on removing clock cycles, it does not improve counting over short periods of time, it only improves counting over long periods. For example counting a 1/100 s using the RTC will be more accurate without calibration than with calibration. Since calibration cycle removal may or not occur during the considered time frame, the resulting value may change significantly. So depending on the application it may be better not to use calibration. |
|
|
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 |