Skip to main content
Associate II
July 9, 2025
Question

How to properly implement external 32.768 kHz crystal for accurate RTC on STM32F407VGT6?

  • July 9, 2025
  • 4 replies
  • 638 views

Hi STM Community,

I am using a custom board based on the STM32F407VGT6 MCU. Currently, I’m not getting accurate RTC time when using the internal LSI clock (the drift is too high for my application). So I’ve decided to use an external 32.768 kHz crystal oscillator connected to PC14 (OSC32_IN) and PC15 (OSC32_OUT) as recommended.

Could you please clarify:

  1.  What are the exact hardware requirements (crystal specs, load capacitors, recommended ESR, drive level)?

  2.  How should I calculate and place the load capacitors to match the crystal?

  3.  Are there any layout best practices (trace length, shielding, keep-out) to get stable LSE operation?

  4.  Any recommended crystal part numbers that work well with STM32F4?

  5.  Any common issues or troubleshooting tips if the LSE does not start?

4 replies

mƎALLEm
Technical Moderator
July 9, 2025

Hello,

You can refer to this article: How to select a compatible crystal and load capacitors for STM32 with layout guidelines

or for more details refer to the AN2867 "Guidelines for oscillator design on STM8AF/AL/S and STM32 MCUs/MPUs"

Also read this article on How to calibrate the STM32's real-time clock (RTC)

AN2867 / Table 7. Recommended crystal / MEMS resonators for the LSE oscillator in STM32 products gives some recommanded crystals for LSE. 

STM324G-Eval or STM32F4Duscovery boards could be a reference, they use the same crystal: MC306-G-06Q-32.768 from JFVNY (www.jfvny.com).

Hope that helps.

 

 

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."
Visitor II
July 9, 2025

And read the oscillator data sheet to see if you need to correct for temperature deviation from 25C.

AScha.3
Super User
July 9, 2025

Hi,

or do it "my way" . :)

Forget all this problems and invest 30 ct more than for a crystal and caps : use a low power crystal oscillator.

see mouser...for example :  (mems type osc. here)

AScha3_0-1752082428530.png

~ 1 uA , 5ppm , 1.xx €

AScha3_1-1752082583657.png

even temp compensated!

AScha3_2-1752082755055.png

at 0.8 x 1.5 mm size.

 

And problem solved.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Tesla DeLorean
Guru
July 10, 2025

You can also check reference designs for DISCO, EVAL and NUCLEO boards, the schematics and BoM can be found under the "CAD Resources" tab on those product pages.

Perhaps the AI bot can dig this information for you?

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