cancel
Showing results for 
Search instead for 
Did you mean: 

Hello. I am using in my project STM32F730V8T6 with external resonator (HSE) 16.000 MHZ (XRCHJ16M000F1QB1P0). When outputting the frequency to external ports, I will experience a spontaneous frequency change (16.1000-16.1080 kHz).

ВНевг.1
Associate II

Before that I used STM32F030R8T6, there was no such problem. Tell me where I could be wrong?

I am attaching screenshots of the organization of power supply and settings of the CubeMX

1 ACCEPTED SOLUTION

Accepted Solutions

The HSE tracks are too long, but what's much worse is the ground routing - it MUST go from the capacitors to the nearest VSS pin (pin 10) the shortest possible way.

Cut the trace from capacitors to the via to ground, and connect it using a wire to the via which comes from pin 10. 0693W00000BaRkHQAV.png 

> The oscilloscope measured the power lines for surges.

We are talking about millivolts here. The oscillator is a relatively low-power analog circuit.

JW

PS. Meals... okay, that's a funny google autotranslation, Питание in this context translates to "supply"... :)

View solution in original post

10 REPLIES 10
TDK
Guru

What is ZQ1 part number? Do your load cap values match the guidelines in AN2867?

https://www.st.com/resource/en/application_note/cd00221665-oscillator-design-guide-for-stm8afals-stm32-mcus-and-mpus-stmicroelectronics.pdf

If you feel a post has answered your question, please click "Accept as Solution".
ВНевг.1
Associate II

Part number ZQ1 - XRCHJ16M000F1QB1P0 (16.000 MHZ). ZQ1 frequency gives out stably, measured by an oscilloscope.

MSU starts up and runs on ZQ1, but there is always noise at the PWM output. We tried to tune the PWM instead of 16 kHz at 100 Hz, the noise is also preserved but in the least significant digits (from 101.200 Hz to 101.210 Hz).

If ZQ1 output is stable/accurate and PWM output is not, it suggests your PWM parameters are incorrect.
If you feel a post has answered your question, please click "Accept as Solution".

Output system clock to MCO and observe.

I wouldn't be surprised if you'd run out of HSI instead of HSE. Read out and check RCC registers content. Maybe CSS kicked in.

If not, there may be noise severely impacting the crystal oscillator - this boils down to layout, vicinity of high-pulsed-current tracks to HSE tracks, power supply stability/decoupling and grounding arrangement. Strip down your code to absolute minimum exhibiting the problem, while not driving any significant external load. If still stability problems, try the code on a "known good" board such as Nucleo or Disco.

JW

ВНевг.1
Associate II

Tracing ZQ1

ВНевг.1
Associate II

Tracing power (GND and 3.3V)

ВНевг.1
Associate II

There is no high-pulsed-current tracks nearby.

The oscilloscope measured the power lines for surges. Meals within the framework of the instructions in the manual for the low dropout regulator (TLV73333PDBVT)

The HSE tracks are too long, but what's much worse is the ground routing - it MUST go from the capacitors to the nearest VSS pin (pin 10) the shortest possible way.

Cut the trace from capacitors to the via to ground, and connect it using a wire to the via which comes from pin 10. 0693W00000BaRkHQAV.png 

> The oscilloscope measured the power lines for surges.

We are talking about millivolts here. The oscillator is a relatively low-power analog circuit.

JW

PS. Meals... okay, that's a funny google autotranslation, Питание in this context translates to "supply"... :)

ВНевг.1
Associate II

Thanks, I will try your advice soon