cancel
Showing results for 
Search instead for 
Did you mean: 

Help with ST32L011D4 32.768KHz Accuracy

Bill Scholl
Associate
Posted on May 25, 2017 at 15:16

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-accuracy
6 REPLIES 6
Posted on May 25, 2017 at 19:21

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Nesrine M_O
Lead II
Posted on May 25, 2017 at 19:51

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-

LMI2
Lead
Posted on May 25, 2017 at 22:25

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.

Posted on May 25, 2017 at 22:35

I'd assume the LSE as the LSI is a 'Internal low-power 37 kHz RC'

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 25, 2017 at 22:39

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)

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Max
ST Employee
Posted on May 26, 2017 at 08:49

you may find useful information in this application note:

http://www.st.com/resource/en/application_note/dm00226326.pdf