Skip to main content
Visitor II
June 8, 2021
Solved

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).

  • June 8, 2021
  • 9 replies
  • 5270 views

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

    This topic has been closed for replies.
    Best answer by waclawek.jan

    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"... :)

    9 replies

    Super User
    June 8, 2021
    Visitor II
    June 8, 2021

    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).

    Super User
    June 8, 2021
    If ZQ1 output is stable/accurate and PWM output is not, it suggests your PWM parameters are incorrect.
    Super User
    June 8, 2021

    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

    Visitor II
    June 8, 2021

    Tracing ZQ1

    Visitor II
    June 8, 2021

    Tracing power (GND and 3.3V)

    Visitor II
    June 8, 2021

    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)

    Super User
    June 8, 2021

    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"... :)

    Visitor II
    June 8, 2021

    Thanks, I will try your advice soon

    Visitor II
    June 9, 2021

    Waclawek.jan, Thank you, your advice helped.