2017-05-25 06:16 AM
I want to use the ST32L011D4 with a 32.768KHz crystal. One of the features/bullet points for this device mentions '32 kHz oscillator for RTC with calibration'. Does anyone have information on methods to calibrate the crystal frequency for real time accuracy?
#st32l011d4-32.768khz-accuracy2017-05-25 10:21 AM
STM32L011D4
http://www.st.com/en/microcontrollers/stm32l011d4.html
Course correction is typically achieved via the prescaler/divider, and fine via longer term clock stuffing or removal.
Not really any temperature or voltage compensation.
You'd bench the 32.768 KHz either by supplying a reference for the STM32 to measure against via a TIM attached to the RTC sources, or you'd export the signal via MCO or RTC pin and measure on your own test equipment and push back in the desired settings.
Not using these L0 parts myself, so not much time invested in absorbing the docs or experimenting.
2017-05-25 10:51 AM
Hi
scholl.bill
,You can refer to this example under the STM32L0 HAL package,it may help you: itdemonstrates and explains how to use the LSI clock source auto calibration to get a precise RTC clock:
STM32Cube_FW_L0_V1.9.0\Projects\STM32L011K4-Nucleo\Examples\RTC\RTC_LSI
-Nesrine-
2017-05-25 01:25 PM
32kHz crystals are also more unstable than other hugher frequency crystals. If you need to calibrate or tune the frequency, perhaps you should use a stable few MHz crystal. It will consume more power but it will stay in time.
2017-05-25 03:35 PM
I'd assume the LSE as the LSI is a 'Internal low-power 37 kHz RC'
2017-05-25 03:39 PM
You should be able to use the HSE source to benchmark the LSI or LSE, and turn on the HSE electively.
The LSI tends to be all over the map (this spec of 26 .. 56 KHz, with 38 KHz nominal)
2017-05-25 11:49 PM
you may find useful information in this application note:
http://www.st.com/resource/en/application_note/dm00226326.pdf