cancel
Showing results for 
Search instead for 
Did you mean: 

LSI and HSI accuracy versus temperature and time

jean-francois2
Associate II
Posted on October 15, 2015 at 08:41

Hello,

I 'm using a STM32F030C8 and I generate a tick of 1.136ms with the RTC with subseconds alarm.

I calibrate the LSI with the HSI (=8Mhz) but I don't know how LSI and HSI frequencies change when temperature changes.

I need to know this charateristics to evaluate the accuracy of my tick.

I think the accuracy is not enough so perhaps it would be necessary to used a crystal with LSE

Regards

5 REPLIES 5
Nesrine M_O
Lead II
Posted on October 15, 2015 at 10:42

Hi grandmougin.jean_fra,

I'd highly recommend you to have a look to the HSI oscillator characteristics in the datasheet related to your STM32F0 product.

-Syrine –

Danish1
Lead II
Posted on October 15, 2015 at 10:47

The only information available is that which is in the data sheet, which I found at http://www.st.com/web/en/resource/technical/document/datasheet/DM00088500.pdf following the links in St's website.

From table 35 I see that the HSI can vary by +/- 5% over the temperature range -40C to +85C.

I guess you would like to know what the curve is for this variation over temperature, but I don't think that such information is available.

My knowledge of semiconductors says that many things vary proportional to absolute temperature, and many things vary in an exponential form rather than anything more linear. To get a tolerance that tight, ST probably are applying some form of temperature-compensation, and what we get is the residual error between what the oscillator would naturally do and the correction that ST are applying. The shape of this residual error can probably be modelled as a low-order polynomial which you can measure and characterise on your bench but you should NOT assume that another STM32F030 from a different batch will have the same curve. If things were that predictable then ST would have made the effort to design it out.

As for the LSI, the tolerance is even worse. Table 37 says it can be anywhere between 30 and 50 kHz. I expect that such a low-power oscillator (without a resonator such as a crystal) would suffer badly from phase noise so you will not even get a stable frequency at a fixed temperature! There might be some predictable variation over temperature but it is hard to think of circumstances where correction for that is worthwhile rather than simple periodic recalibration from a better source such as HSI.

What accuracy does your application need?

In my opinion LSE with a crystal is a good choice (except where unit cost and/or overall size are critical issues).

Hope this helps,

Danish

jean-francois2
Associate II
Posted on October 15, 2015 at 11:31

Thanks,

I have read the information in datasheet but all information are global. We don't know the impact of  temperature and time on the accuracy.

I agree, it would be better to use an external crystal on LSE but we have a strong cost target. So I try to develop without crystal.

If I know this information, I can calibrate the product. I would like to have an accuracy of less than 2%.

From: Danish Ali

Posted: Thursday, October 15, 2015 10:47 AM

Subject: LSI and HSI accuracy versus temperature and time

The only information available is that which is in the data sheet, which I found at http://www.st.com/web/en/resource/technical/document/datasheet/DM00088500.pdf following the links in St's website.

From table 35 I see that the HSI can vary by +/- 5% over the temperature range -40C to +85C.

I guess you would like to know what the curve is for this variation over temperature, but I don't think that such information is available.

My knowledge of semiconductors says that many things vary proportional to absolute temperature, and many things vary in an exponential form rather than anything more linear. To get a tolerance that tight, ST probably are applying some form of temperature-compensation, and what we get is the residual error between what the oscillator would naturally do and the correction that ST are applying. The shape of this residual error can probably be modelled as a low-order polynomial which you can measure and characterise on your bench but you should NOT assume that another STM32F030 from a different batch will have the same curve. If things were that predictable then ST would have made the effort to design it out.

As for the LSI, the tolerance is even worse. Table 37 says it can be anywhere between 30 and 50 kHz. I expect that such a low-power oscillator (without a resonator such as a crystal) would suffer badly from phase noise so you will not even get a stable frequency at a fixed temperature! There might be some predictable variation over temperature but it is hard to think of circumstances where correction for that is worthwhile rather than simple periodic recalibration from a better source such as HSI.

What accuracy does your application need?

In my opinion LSE with a crystal is a good choice (except where unit cost and/or overall size are critical issues).

Hope this helps,

Danish

Posted on October 15, 2015 at 11:52

If the mcu interfaces to another device via a protocol with defined timing (e.g. UART) and that other device is known precise, you can derive your timing/calibration from that, dynamically.

An exotic solution would be to thermostat the device by loading its pins while measuring its internal temperature, provided enough power is available.

Also, have a look at the STM32F05x datasheet.

JW

Posted on October 15, 2015 at 15:00

I'd also watch for variations due to voltage, and how that might be effected by other components in the system.

The RC oscillators are pretty unstable when the conditions are static. Suggest you push the signals out the MCO pin, or benchmark against a crystal using TIM5 (or whatever your part uses), and get some feeling for that.

ST specifies 5% to give itself a really wide berth
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..