RTC crystal oscillator low voltage - Page 1
Forum section: electronics / general

author: fagiano
author_rank: Regular Contributor
timestamp: March 12, 2014, 07:43:42 pm
content: 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 timeciaoAlbertoPS: if this is normal it could just be a software problem

author: fagiano
author_rank: Regular Contributor
timestamp: March 12, 2014, 08:14:46 pm
content: forget about it, was a software problem. Still, why is the voltage so low? Something to do with the scope probe?ciaoAlberto

author: nctnico
author_rank: Super Contributor
timestamp: March 12, 2014, 08:29:01 pm
content: I've seen this as well with other chips. It's probably so low to preserve power.

author: fagiano
author_rank: Regular Contributor
timestamp: March 12, 2014, 09:24:00 pm
content: good to know thank you!Alberto

author: uwezi
author_rank: Unknown
timestamp: March 12, 2014, 09:33:06 pm
content: 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.

author: dannyf
author_rank: Super Contributor
timestamp: March 12, 2014, 10:11:07 pm
content: 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.

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: March 12, 2014, 11:08:09 pm
content: 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 NPOzero 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

author: Harvs
author_rank: Super Contributor
timestamp: March 13, 2014, 12:52:16 am
content: Yes that's excessivehttp://www.wolframalpha.com/input/?i=20+seconds%2Fday+as+ppm230ppm slow is a lot of extra capacitance. Maybe your ground plan is causing this.I did a write up of an RTC cal herehttp://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.

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: March 13, 2014, 01:50:12 am
content: QuoteI 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.

author: Harvs
author_rank: Super Contributor
timestamp: March 13, 2014, 02:16:35 am
content: 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?

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: March 13, 2014, 03:21:51 am
content: QuoteNormally 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.

author: gxti
author_rank: Frequent Contributor
timestamp: March 13, 2014, 04:56:07 am
content: 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.