0
\$\begingroup\$

After reading the Oscillator design guide for STM8AF/AL/S, STM32 MCUs and MPUs pdf, I have found very little information available for me to make a decision on which oscillator will best fit my project.

I am looking to for an 8 MHz oscillator that will satisfy the requirements on the guideline, however it is pretty difficult to determine all the requirements if you still don't know the C_s (Stray capacitance) of the crystal leads and pcb traces on my board (I still haven't printed/designed the PCB).

So, knowing just a minor number of requirements what do you have suggest I do? I need to find an 8 MHz that will be a good fit for an STM32F446RC for audio applications.

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

\$\endgroup\$
10
  • 1
    \$\begingroup\$ You can also get MEMs oscillators that you just hook up straight to the pin. No caps or anything. \$\endgroup\$ – DKNguyen Apr 13 at 20:52
  • \$\begingroup\$ Why can't you use the Cstray approximations in ST datasheet and crystal appnotes? What audio sampling rates are you aiming for, and have you checked the reference manual if a 8 MHz crystal can provide those frequencies? How accurate the frequencies must be? \$\endgroup\$ – Justme Apr 13 at 21:00
  • \$\begingroup\$ Are you really looking for an oscillator (self-contained 'black-box' which you apply power to and it spits out a square wave) or are you looking for a crystal or resonator (which forms part of an oscillator, usually by connecting to 2 pins on your micro which itself contains the rest of the oscillator circuitry)? \$\endgroup\$ – brhans Apr 13 at 21:02
  • \$\begingroup\$ @Justme The target sampling frequency is 44.1 kHz. The error % we are looking for would be less than 1%. Here's another post I made where I talk about it more depth in the comments: electronics.stackexchange.com/questions/559008/… General Cstray approximaations are not given. Not that I know of. \$\endgroup\$ – dcm Apr 13 at 22:40
  • 1
    \$\begingroup\$ Can you please link the guide you said you have already read so nobody repeats or guesses the manufacturer's recommendations? \$\endgroup\$ – Spehro Pefhany Apr 14 at 3:54
0
\$\begingroup\$

Usually what you do is get the oscillator and then use an oscilloscope and tune the capacitors.

On the boards I use with the STM32's I use an 8MHz oscillator with 22pf caps on the output. I'm willing to bet that most oscillators will work fine with 22pf as the internal capacitance is on the order of 1-5pF for most oscillators. In addition at 8Mhz it is much less critical to tune the oscillator then say a 50MHz oscillator.

I've also used MEMs oscillators with a CMOS output at 50MHz and those work good also.

If using a fast (or in production with FCC req's) oscillator make sure you have guard traces to ground and have good parasitics (keep the trace short to the processor and the oscillator close as possible to minimize trace inductance and resistance.

\$\endgroup\$
1
  • \$\begingroup\$ Can you also mention the parameters of the crystal (rated load capacitance, ESR, etc) you use with the 22pF capacitors? 22pF is quite close to the maximum recommended, and it would imply that crystal has rated load of 16pF to 20pF? \$\endgroup\$ – Justme Apr 14 at 7:08
0
\$\begingroup\$

I would use either one from the same family used in a reference design or pick a commonly available part (search by quantity available on a distributor like Digikey's website), and then use its characteristics in the formulas provided by STMicroelectronics to check it is appropriate. Budget a few pF for stray capacitance, then measure and tune as necessary.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.