STM32F103C8 and bad LSE clock

Post here first, or if you can't find a relevant section!
Post Reply
ChPr
Posts: 25
Joined: Thu Jun 20, 2024 8:03 am
Answers: 1

STM32F103C8 and bad LSE clock

Post by ChPr »

Hello everybody,

I'm using an STM32F103C8 board on a PCB. All the pins on the STM32F103C8 are soldered to the PCB, including PC14 and PC15.

The frequency from the LSE clock is such that it loses about 2 minutes per day, which is enormous. Do you think this is due to the parasitic capacitances added by the PCB, or is it another reason ?

Best regards.

Pierre.
STM32ardui
Posts: 142
Joined: Mon May 06, 2024 1:46 pm
Answers: 1
Location: Germany

Re: STM32F103C8 and bad LSE clock

Post by STM32ardui »

A crystal with 20 ppm should have a deviation of 1,7 s per day. May be more, if board is not working at room temperature.
You are not the first here with LSE problems on a STM32F103 ...

1. Sure you activated LSE?
2. May be crystal is damaged?
3. Stray capacity can have an effect. I would guess, the short lines to pinheader and pins have something below 5 ~ 8 pF.
4. You can cut lines to pinheader and observe, if it's getting better.
5. Or you can take another board to compare.

AN2867 Guidelines for oscillator design
ag123
Posts: 1898
Joined: Thu Dec 19, 2019 5:30 am
Answers: 30

Re: STM32F103C8 and bad LSE clock

Post by ag123 »

there are some codes for adjusting LSE for RTC on stm32f103 in libmaple core
https://github.com/rogerclarkmelbourne/ ... /RTCAdjust
but that you would need to port that code over to stm core if you want to use it

i used it to adjust cheap Alix crystals that are sometimes wildly off
https://www.aliexpress.com/w/wholesale-32768.html

alternatively, get a better crystal
ChPr
Posts: 25
Joined: Thu Jun 20, 2024 8:03 am
Answers: 1

Re: STM32F103C8 and bad LSE clock

Post by ChPr »

Hello everybody

The last measurement I took showed a loss of 3 minutes over one day.

Not knowing if I was going to succeed, I set about desoldering pins PC14 and PC15 between the STM32 board and the PCB. Not easy, but I succeeded.

But what a satisfaction ! Since yesterday, my LSE clock has lost only one second.

Best regards.

Pierre.
defensemanage
Posts: 1
Joined: Wed Oct 09, 2024 9:02 am
Location: https://geometrylite.org

Re: STM32F103C8 and bad LSE clock

Post by defensemanage »

ag123 wrote: Mon Sep 30, 2024 1:38 am there are some codes for adjusting LSE for RTC on stm32f103 in libmaple core
https://github.com/rogerclarkmelbourne/ ... /RTCAdjust
but that you would need to port that code over to stm core if you want to use it

i used it to adjust cheap Alix crystals that are sometimes wildly off
https://www.aliexpress.com/w/wholesale-32768.html

alternatively, get a better crystal
Easy to find information on github page through keywords. The sources you update are really great!
Post Reply

Return to “General discussion”