Author Topic: RTC crystal oscillator low voltage  (Read 6003 times)

0 Members and 1 Guest are viewing this topic.

Offline fagianoTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: it
RTC crystal oscillator low voltage
« on: March 12, 2014, 07:43:42 pm »
Hi, I designed a board with a STM32F4 on it. I just reliazed the RTC is not ticking so I tested the 32.768KHz crystal signal. It is oscillating at the right frequency but is only ~400mV, while the main MCU crystal is around to 2.5V+.
Is this normal? if not what could be the problem?(newbie here)

the device is a ABS10-32.768KHz-7-T the caps are 6.8pF ceramic.

thank you for your time

ciao
Alberto

PS: if this is normal it could just be a software problem
 

Offline fagianoTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: it
Re: RTC crystal oscillator low voltage
« Reply #1 on: March 12, 2014, 08:14:46 pm »
forget about it, was a software problem. Still, why is the voltage so low? Something to do with the scope probe?

ciao
Alberto
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26896
  • Country: nl
    • NCT Developments
Re: RTC crystal oscillator low voltage
« Reply #2 on: March 12, 2014, 08:29:01 pm »
I've seen this as well with other chips. It's probably so low to preserve power.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline fagianoTopic starter

  • Regular Contributor
  • *
  • Posts: 61
  • Country: it
Re: RTC crystal oscillator low voltage
« Reply #3 on: March 12, 2014, 09:24:00 pm »
good to know thank you!

Alberto
 

Offline uwezi

  • Supporter
  • ****
  • Posts: 272
  • Country: se
    • GreenPhotons
Re: RTC crystal oscillator low voltage
« Reply #4 on: March 12, 2014, 09:33:06 pm »
It's normal!

These 32kHz crystals are designed to be run at the lowest power consumption possible - this thing is supposed to run all the time, even when the processor is in deep sleep. Running it at any higher amplitude would mean a much higher power consumption as well.

It is the same crystals which are used in watches and wall clocks, many of which run on just 1.5 V supply voltage.

Actually the frequency will be slightly off, if you try to run the crystal with a higher amplitude, and it will most probably degrade much faster as well.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: RTC crystal oscillator low voltage
« Reply #5 on: March 12, 2014, 10:11:07 pm »
RTC oscillation is in my view the achillies' hill for stm32f chips: they tend to be more difficult to oscillate reliable than other chips.

A few things I have learned:

1) use a serial resistor on the output pin to help get it going. I would start with 100kohm there. Experiment with your chip / layout.
2) use quality crystal;
3) use load capacitance specified by the oem;
4) clean the board and use wider spacing between traces;
5) it is less common now but if you could ground the metal case, do it.

================================
https://dannyelectronics.wordpress.com/
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: RTC crystal oscillator low voltage
« Reply #6 on: March 12, 2014, 11:08:09 pm »
Hopefully only partially hijacking a closed thread here:

I have had one trouble with the my STM32F1 boards.

I have one board with an RTC that runs a bit slow. Whereas the other exact same boards run within spec.

I have changed caps and processor, but not xtal and it is still slow. Didn't have the spare Xtal handy. It loses maybe 20 seconds a day where it should be more like 1 second.

Caps 5.6pF NPO
zero series resistance.
Board capacitance may be a bit excessive as I put a ground plane straight underneath. I measure about 1-2pF with my LCR meter.
But really the RTC is within spec on other similar boards.

I removed one of the load caps completely it actually ran slightly fast. I forgot which leg.
Maybe I should try the series resistor.


I was wondering if a faulty or damaged XTal was likely to cause this? Having replaced everything else. Battery but it's slow even when the board is powered on? or processor? 

For future reference is it better to run the ground plane under the XTal? I read somewhere that is isn't.
Does board capacitance count for much, should I allow for it if the processors oscillator only has 6pf load capacitance specified.









http://www.cardinalxtal.com/uploads/files/cpfb.pdf
 

Offline Harvs

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au
Re: RTC crystal oscillator low voltage
« Reply #7 on: March 13, 2014, 12:52:16 am »
Yes that's excessive http://www.wolframalpha.com/input/?i=20+seconds%2Fday+as+ppm

230ppm slow is a lot of extra capacitance.  Maybe your ground plan is causing this.

I did a write up of an RTC cal here http://www.westcoastmakers.com/threads/real-time-clock-calibration.255/ if you're interested.

Assuming it's the same as the F4, the coarse and fine calibration registers work well.  However to check your results you do need to measure the results over a 64 min period for it to complete a full adjustment cycle.
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: RTC crystal oscillator low voltage
« Reply #8 on: March 13, 2014, 01:50:12 am »
Quote
230ppm slow is a lot of extra capacitance.  Maybe your ground plan is causing this.

I guess I wasn't really clear,
All boards are the exact same gerbers, most boards are ok, one board is different. The most probable factor is the crystal. I was wondering if it is likely that a crystal can somehow be borked by about this amount. I have resoldered, replaced caps. No effect. I think I may have even had this borked xtal on another board earlier but I am not sure of this.

The bit about the ground plane was not central to this 4000ppm xtal issue but I was wondering how much effect the ground planes capacitance was having. I have read different things on ground planes under Xtals.

Read you RTC blog entry, it was useful to me. I haven't got any very accurate time piece so I will just let the boards run for a day and get the drift that way. ie NTP. From my PC. Thanks.



 

Offline Harvs

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au
Re: RTC crystal oscillator low voltage
« Reply #9 on: March 13, 2014, 02:16:35 am »
In that case I'd almost definitely say it's a bad part.  Surely the easiest thing to do here is just swap it for another and test?
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: RTC crystal oscillator low voltage
« Reply #10 on: March 13, 2014, 03:21:51 am »
Quote
Surely the easiest thing to do here is just swap it for another and test?

Normally yes, but I haven't got another Xtal to hand.
The other good boards are long gone.
I will put in for one with my next order, assuming I remember, obviously this board was never my top priority but in the interests of 'zero defects' I guess I should get to the root cause.

I just looked back at when the RTC was last set. To get a longer term idea of the drift.
In 8 weeks it has slowed by 12 minutes.

I just looked it up on wolfram alpha and that is 149ppm. Still well out of bounds.
I'll sort it when I get the chance.



 

Offline gxti

  • Frequent Contributor
  • **
  • Posts: 507
  • Country: us
Re: RTC crystal oscillator low voltage
« Reply #11 on: March 13, 2014, 04:56:07 am »
Also note that probing any crystal with an oscilloscope or other probe will add stray capacitance that will pull it slightly, or even stop it oscillating altogether. On STM32 there are logic outputs you can enable for both the RTC oscillator as well as the main oscillator (MCO). I always bring those pins out to test points because nothing drives you batty like not being 100% sure you've configured your clock chain correctly.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf