Skip to main content
DElec.1
Associate II
September 23, 2022
Question

STM32F4 Hardware for external clock

I want to develop my own PCB using STM32F4. I want to use one external clock (16 MHz). I wonder where I have to connect the clock: OSCIN32-OSCOUT32 (pins 3 and 4) or OSCIN-OSCOUT (HSE) (pins 5 and 6 in STM32F446RET).

I can see in the development board's schematic how there is an empty footprint for X3 (pins 5 and 6) and I don't know if it is using the debugger's clock.

Thanks in advance.

This topic has been closed for replies.

7 replies

Jaroslav JANOS
ST Employee
September 23, 2022

Hello,

the OSC32 pins are for LSE (32kHz) oscillator, so in your case it is the second pair.

For more information about PCB design guidelines for oscillators refer to AN2867 (https://www.st.com/resource/en/application_note/cd00221665-oscillator-design-guide-for-stm8afals-stm32-mcus-and-mpus-stmicroelectronics.pdf).

Jaroslav

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.
DElec.1
DElec.1Author
Associate II
September 23, 2022

Ok, thank you. I did not know if it were necessary to add two capacitors even if you just want the HSE one. I was having some trouble trying to run code and I think it had to do with the oscillator.

Tesla DeLorean
Guru
September 23, 2022

The NUCLEO / DISCO boards typically source an 8 MHz crystal based source from the ST-LINK's MCO output.

Watch for solder bridges or zero ohm routing of signal.

​

H​SE should use BYPASS mode for external clocks. Use OSCIN only. Check is source or TCXO expects capacitive loading.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
DElec.1
DElec.1Author
Associate II
September 23, 2022

In my PCB I use an external 16 MHz crystal oscillator connected directly to the OSCIN-OSC-OUT pins. The schematic includes two capacitors (value = 2 * (Cload - Cstray) = 26 pF). Do I need to set anything special (apart from basic clock configuration, input, freq, etc) in STMCubeIDE?

0693W00000Sw5naQAB.png 

Tesla DeLorean
Guru
September 23, 2022
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..