cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 External HSE crystal not working

jas.1
Associate

STM32 model : STM32F413CGU6

25MHz crystal : https://media.digikey.com/pdf/Data%20Sheets/AVX%20PDFs/CX3225GA_Series_Spec.pdf

The problem is that I can not connect STM32 by STM32 Cube Programmer. The programmer can not detect STM32 unless I desolder the crystal. When I desolder the crystal I can easily connect and program my STM32.

The schematic :

0693W00000HqMVDQA3.png 

I probe the pins of the crystal. I observed the waves with 180 degree phase shift:

-         25MHz oscillation between 1,5Vdc to 2Vdc for OSCIN pin

-         25MHz oscillation between 1,37Vdc to 2,33Vdc OSCOUT pin

The layout :

0693W00000HqMVXQA3.pngHere are what I’ve tried so far and none of those seemed to work.

-         Change 8pF caps with 15pF / 18pF / 4pF.

-         Change 0Rs with 800Rs. (800 is found by Drive level calculations indicated in STM’s oscillator design guide. I suspected drive level might be the issue.)

-         Change 0Rs with 22R.

-         R2=0R, R1=22R

-         R2=0R, R1=800R

Any help will be appreciated.

Thanks.

2 REPLIES 2
Peter BENSCH
ST Employee

Welcome, @jas.1​, to the community!

It looks like your problem has multiple causes: crystal type and layout.

  • To calculate the suitability of the crystal, you need not only the crystal frequency but also the values of ESR, C0 and CL. In the crystal datasheet, however, only ESR and CL are specified for 25MHz, C0 is missing. This can then be used to calculate the gain margin ratio according to AN2867. Only an unrealistic value of 2pF or less for C0 results in a sufficient gain margin ratio of 5. However, it is more likely that C0 is between 4...6pF, which results in gm = 2.6-3.5. The series resistors (here R1, R2) seldom have an advantage at such high crystal frequencies and generally also worsen gm.
  • But the biggest issue seems to be the your layout, for which you will also find good information in AN2867, section 7.2: the load capacitors must take the shortest possible route back to the GND (VSS) at the STM32 and must not be connected anywhere to a GND plane.

Good luck!

/Peter

In order 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.

Hi Peter,

Thanks for quick return.

I soldered 22R for R1 and 0R for R2 and then use 8pF load capacitance. It worked properly.

In my post I stated I tried R2=0R, R1=22R, but figured out that I soldered 22R in wrong place :) .

Now, things seem fine. I still think the problem caused by drive level. OSCOUT level was 0.5V higher than the OSCIN level. 22R resistor almost equalized the levels.

I hope it will work without any problem in the future.