Skip to main content
oscargomezf
Associate II
June 26, 2018
Question

LSE crystal doesn't work on low temperatures

  • June 26, 2018
  • 21 replies
  • 4589 views
Posted on June 26, 2018 at 10:03

Hi everyone,

I'm working on an STM32F1 platform. I have a problem with the LSE crystal. I'm using this one ABS07-120-32.768kHz-T by Abracon. The problem is with temperatures below 5�C. I made some calculations according to the Application Note AN2867:

According to the  datasheet ABS07-120-32.768kHz-T:

C0=1.20pF, ESR=55kohm (Max 60kohm), CL= 6pF and F= 32.768KHz

And according to the datasheet (page 62/136) del STM32F103RF:

gm = 5uA/V

gmcrit = 4 * ESR * (2?F)^2 * (C0 + CL)^2 = 4 * 60000*(2 * pi * 32768)^2 * (1.2*10^(-12) + 6 *10^(-12) )^2 = 0.0000005273947973 A/V = 0.5273947973 uA/V

gain margin = gm/gmcrit = 5 / 0.5273947973 = 9.48 (60k)

So we meet that the gain margin = gm / gm_crit >= 5.

Considering Cin=Cout=3pF (STM32 processor), CSTRAY=1pF, C1=C2=x and CL=6pF, we get C1=C2:

CL = (Cin + C1)*(C2 + Cout)/(Cin + C1 + C2 + Cout) + CSTRAY

6 = (3 + x)*(3 + x)/(6 + 2*x) + 1

x=7pF

C1=C2=6.8pF

So I think that the selection of the crystal and C1/C2 is right, but when I tried to init the platform inside a thermal chamber the crystal it seems to be that it wasn't able to oscillate because I was checking this function and it's blocked in the while:

while(RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET)

Does anyone help me out?

Best regards.

#lse-startup #stm32f1-clock
This topic has been closed for replies.

21 replies

AvaTar
Senior III
June 26, 2018
Posted on June 26, 2018 at 10:19

I'm not a hardware guy, but what temperatures are you talking about ?

Are they covered by the LSE crystal's datasheet, i.e. are you within guaranteed limits ?

I was checking this function and it's blocked in the while:

while(RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET)

You could consider a fall-back to LSI, perhaps checking the die temperature.

waclawek.jan
Super User
June 26, 2018
Posted on June 26, 2018 at 10:33

while(RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET)

 It's startup of the LSE oscillator, right?

Try to use a longer timeout. It's not unusual for the LSE to start tens of seconds - I wouldn't shy to be use several minutes as timeout. The chamber might serve as a Faraday cage, screening off electromagnetic noise, which helps the oscillator startup.

JW

oscargomezf
Associate II
June 26, 2018
Posted on June 26, 2018 at 10:56

Hi waclawek.jan,

1. According to: ' It's startup of the LSE oscillator, right? Try to use a longer timeout. It's not unusual for the LSE to start tens of seconds - I wouldn't shy to be use several minutes as timeout.'

I dind't understand you. I'm waiting in the loop in an infinite way.

2.The chamber might serve as a Faraday cage, screening off electromagnetic noise, which helps the oscillator startup.

I've opened the chamber and take out the PCB to normal temperature environment and it took a long time to start working again

Danish1
Lead III
June 26, 2018
Posted on June 26, 2018 at 21:43

I typically guess 5 pF for the stray capacitance, even with a fairly tight pcb layout. Where did you get your 1 pF from? What is the total length of pcb trace from each processor pin to the crystal in mm?

I note AN2867 suggests calculating the correct stray-capacitance from the frequency-error when you put 'any-old-capacitor' in the circuit. I don't believe that works in practice because the crystal centre-frequency has a tolerance and the next crystal off the production-line might be out in the opposite direction!

AvaTar said:

I remember that RF oscillator design includes careful selection of NTC and PTC components, to avoid/minimize drift.

The cut of the crystal will be such as to minimise frequency drift over the rated frequency-range (when loaded with the right capacitance). And the capacitors of a few pF should be ceramic C0G / NP0 with little or no change in capacitance over temperature.

 - Danish

STOne-32
ST Technical Moderator
June 26, 2018
Posted on June 26, 2018 at 22:54

Dear Gentleman,

We have an errata on our STM32F1 series and especially for the XL density. The LSE_OSC_IN pin is very sensitive to leakage that is amplified at low temperature. See Section 2.7 

https://www.st.com/content/ccc/resource/technical/document/errata_sheet/ce/77/87/11/49/3c/41/03/CD00273032.pdf/files/CD00273032.pdf/jcr:content/translations/en.CD00273032.pdf

 

Can you add this high value parallel resistance and let me know if it works ?

This is behavior is not linked to a crystal compatibility or not.and that Abracon part is tuned to match our STM32 MCUs and designed in 2011 so enough mature and in production for > Millions  units so far.

Cheers,

STOne-32.

oscargomezf
Associate II
June 27, 2018
Posted on June 27, 2018 at 18:23

Hi STOne-32,

I tried to place 2 resistors of 10MOmh in series, because I didn't have one of 20 MOhm, but It doesn't work. I was waiting for more than 3 minutes in order to start the oscillation.

Do you have any suggestion?

Best regards.

STOne-32
ST Technical Moderator
June 28, 2018
Posted on June 28, 2018 at 01:09

Hi,

So it seems another issue may linked to your PCB or board. If you can clean the flux residue , the. To swap another MCU to see it is following the Board or our micro, if it is the micro, we may need to investigate it and get the sample.

regards,

STOne-32

STOne-32
ST Technical Moderator
June 28, 2018
Posted on June 28, 2018 at 10:46

Hi,

The design seems good.  Can you please share all Layers seperatly to check the Vias and Ground connections.  I fear there is a ground loop creating a leakage somewhere, but to be confirmed.

Cheers,

STOne-32.

Nicholas Yunker_2
Senior
June 28, 2018
Posted on June 28, 2018 at 15:25

I concur, I've been doing hardware design for the last 10 years and this appears to be exactly how I would have done it.

Russ Heibel
Visitor II
June 28, 2018
Posted on June 28, 2018 at 12:34

Very similar problem experienced on STM32F32x series processor. The problem was resolved to be leakage caused from moisture on the board. The LSE circuits in the STM parts are tremendously sensitive. Our solution was to conformal coat the board encompassing this entire circuit. Haven't had the problem recur since then.

Good luck...

Nicholas Yunker_2
Senior
June 28, 2018
Posted on June 28, 2018 at 15:24

If this is indeed the problem then placing the board in an environmental chamber and lowering the temperature could cause condensation on the PCB.  This would typically not happen unless some humidity also made it into the chamber, but it is possible.