cancel
Showing results for 
Search instead for 
Did you mean: 

Using LSE for RTC on a STM32F4DISCOVERY board.

arnaljl2
Associate II
Posted on February 24, 2013 at 02:29

Hello everyone.

As many may have noticed, the STM32F4 discovery boards comes with an unfitted OSC32 crystal (X3) & biasing caps (C16 & C27).

Did anyone ever tried to provide  her/his the board with those missing components.

I tried to solder a 32.768Hz T6 crystal, salvage from a functionnal digital clock, along with 15pF caps, but no matter what, the LSERY flag never get set even though LSEON is.

Of course, I didn't provide VBAT any external supply, since it's bridged to VDD through R26, but the LSE is bound to be powered by VDD due to the internal reset circuitry anyway.

Still, no oscillation on the crystal's pins... strange.

Did I neglect some hardware configuration ?

#stm32f4discovery-rtc-lse-crystal
10 REPLIES 10
Posted on February 24, 2013 at 03:16

�? Oscillator onboard. From X3 Crystal (not provided). Configuration needed:

– SB15, SB16 OPEN

– C16, C27, R21 and R22 soldered.

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/DM00039084.pdf

The 32 KHz crystal needs to be a 6-7pF type (load capacitance) not a 9-12pF type, chances are your random crystal is the latter.

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/application_note/CD00221665.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
arnaljl2
Associate II
Posted on February 24, 2013 at 19:45

Thanks for your answer clive1 !

Well, R21 and R22 are already mounted.

The JINGYUXING tech crystal ST recommends on the schematics offers these specs :

- 6pF, 20ppm freq accuracy, and 50KOhms of motional ESR...

pretty much the same as the T6 Seiko crystal I've salvaged :

min 3.7pF max 6.0pF, 20ppm, 55kΩ ESR.

To be fair, I'd say the SEIKO rice grain one is even more prone to oscillate under such tenuous drive currents, as it claims to start oscillating with a drive asweak as 10nW !  It's a VT-200-FL type, for low power apps, designed to be used on wristwatches.

Fact is, I wouldn't have chosen a 49U crystal from some random 8086-operated PCB, as I had in mind to find a match for what usually is a button-cell-feeded piece of circuitry.

But you've dropped a dime here : aren't my load caps a bit too ''big'' ???... 15pF instead of 6.8pF... ( since I don't have lower values in stock anymore). Maybe they're choking the OSC32 drive.

Even worse: maybe I did  overheat the crystal while soldering it back on the discovery board. These have crappy plastic leads spacers, that tends to short to the metal casing. *sigh*

Pfew ! I would never have guessed I'd have such a hard time driving such a slow oscillator !

M0NKA
Senior
Posted on February 25, 2013 at 11:04

Hi,

It is the value of the capacitors for sure, try to experiment with different values, just to make it work, then worry about the crystal freq shifted way off to give precise clock.

Even with high quality, low ppm crystal you will be few Hz away. Not surprised that is

not starting at all with old, probably rubbish crystals.

BR, Chris

arnaljl2
Associate II
Posted on March 04, 2013 at 22:53

''not starting at all with old, probably rubbish crystals.''

Come again ?

Did I ever say it was old & rubbish ? It was salvaged from a brand new digital clock. period.

Please, don't look down on one's pauper & quick means to test something.

Otherwise, send me some money, I'll appreciate the move.

M0NKA
Senior
Posted on March 06, 2013 at 14:34

Hi,

Nothing strange or magic, all is in the pdf. The LSE is quite sensitive to the quality and

values of the external parts used. Not sure what digital clocks cost where you live, but

here those are cheaper than a sandwich and a coke, so yes, we can safely assume that

everything inside is a cheap rubbish.

Chris

Bill Lewis
Associate III
Posted on March 13, 2013 at 22:03

I used this crystal on an STM32F3-Discovery.

Digi-Key  SER2417CT-ND

I forgot to order the capacitors, but had some 5.1pF SMD caps already in stock, used those, and it worked. Clock reads out 32768.1 Hz on an HP counter.  It runs for a week on a 0.22F Supercap.  I haven't defluxed the PCB areas yet. 

-Bill

Bill Lewis
Associate III
Posted on March 13, 2013 at 22:05

Oh, and I'm using the medium-low setting for crystal current.

I picked that one randomly, it worked, and I never bothered trying the other settings yet.

arro239
Senior
Posted on July 02, 2013 at 21:27

What is the package for these C16 and C27? Or the DigiKey part numbers?

Posted on July 02, 2013 at 22:09

Look to be 0603 land patterns

From the STM32L-Discovery BOM, the same 6.8pF are

YAGEO

CC0603CRNPO9BN6R8

capacitor,6.8PF,+/-0.25PF,50V,NPO,0603,YAGEO

http://www.mouser.com/ProductDetail/Yageo/CC0603CRNPO9BN6R8/?qs=5q%252bqlK8CmJR659FDDF%252bZ0w==

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..