Microprocessor Oscillator Circuits for STM32H7 & STM32F0

ย 

Introduction & Purpose

When initially sourcing oscillators we assumed it was very simple. Our initial oscillators were out of stock when we went to purchase components, so we reselected just prior to ordering the components. The reselected oscillators, the ones we ordered, were even less researched prior to ordering so now that Iโ€™ve got some time I am going over everything we know about the microprocessor oscillator circuits and being sure they will work and what we need to do to ensure they work as required. Also, there were some recent concerns raised about the circuit that got me thinking more in depth about this stuff. Instead of spamming the #flight-controller channel in Discord, I will be confining my research to this document.

This document will be screenshot heavy from my references. In order to make a proper document on this topic I should rewrite a lot of the content myself, however, I do not have a plethora of time currently as finals are just around the corner.

In summary, the question I am seeking to answer in this document is: are these applications correct? and if not, can they be fixed using the same oscillator component via a circuit modification? if so how? and if not, what is a correct oscillator we need? and why?

ย 

Purchased Oscillators & Current Circuits

For the STM32H7, Y1, we selected MPN โ€œASCO-25.000MHZ-EK-T3โ€ and DKPN โ€œ535-12075-1-NDโ€. Our current oscillator circuit for the H7 is:

ย 

For the STM32F0, Y2, we selected MPN โ€œEC5625ETTTS-8.000M TRโ€ and DKPN โ€œ2773-EC5625ETTTS-8.000MCT-NDโ€. Our current oscillator circuit for the F0 is:

ย 

Resources & References

Below is a list of resources that I will be repeatedly referring to. These sources will be the exclusive sources of information referenced within this document to ensure my information is reliable.

ย 

MCU Datasheet Summary

The datasheets are extremely brief, however, getting the basic information down feels important to me to help organize my thoughts.

It should be noted as well that as decided by firmware and electrical we will only be using high speed external oscillators (HSEs) for both chips and using the low speed internal oscillators (LSIs) instead of including low speed external oscillators (LSEs) as well. This is primarily due to the fact that the low speed clocks arenโ€™t used for extremely important things and the high speed will be used for communication protocols and other important tasks. Internal clocks are, as a rule of thumb, worse then external clocks (source: it makes sense to me).

6.3.9, page 139, of the STM32H747IGT6 datasheet overviews the โ€œExternal clock source characteristicsโ€ for the MCU. Below is all the information within that section pertaining to the application of an HSE.

The basic information to be taken from this basic overview of the H7 HSE application is that:

  • the typical oscillator is 25MHz (which our selected oscillator is )

  • the oscillator should be a crystal/ceramic resonator oscillator

  • the oscillator (Y1) and load capacitors (CL1 & CL2) should be placed as close as possible to each other and MCU pins

6.3.7, page 52, of the STM32F030RCT6 overviews the โ€œExternal clock source characteristicsโ€ for the MCU. Below is all the information within that section pertaining to the application of an HSE.

Basic information to take from these notes:

  • typically a 8MHz oscillator is used (we did this)

  • a crystal/ceramic resonator should be used

  • the oscillator (Y2) and load capacitors (CL1 & CL2) should be placed as close as possible to each other and MCU pins

A point I skimmed over for both MCU oscillator circuits is there is an Rext resistor that is a part of the HSE circuit. This was something we did not initially consider and will be fully explored in the following sections of this document. This is primarily due to the fact that the datasheets do not elaborate and there is a better discussion of this in STMโ€™s oscillator design guide for STM32 MCUs.

It is worth noting these datasheets show a preference toward crystal/ceramic resonators, but it shows the AC timing diagram and leaves the opportunity open for the possibility of using other oscillator circuits. Because <reason> we will be using the recommended crystal/ceramic resonator applications and such an assumption can be assumed for the purpose of this document.

ย 

Oscillator Design Guide for STM32 MCUs

The more of this document I read, the more I realize that pretty much all of it is important to oscillator theory.

I feel the introduction to this design guide is very insightful, specifically to our certain predicament, and have therefore included here. I am glad we are considering this before producing the PCB and we shouldโ€™ve considered this before purchasing our components.

Section 3.3 provides a nice introduction to load capacitance:

I need to talk about the gain formulas here!!!!!

I need to talk about the gain formulas here!!!!!

I need to talk about the gain formulas here!!!!!

Section 4.2 provides a step by step process to oscillator selection.

Section 5.2 is a massive list of compatible oscillators for HSE. Our oscillators are not on this list, but this is not a concern as long as all the parameters check out (specifically mentioned in FAQs, Section 9).

The rest of the document is regarding placement tips which is all fairly obvious. In essence keep oscillator circuit traces close and away from other high frequency trace and near big stable ground planes. There is a nice conclusion that rounds things up:

ย 

work in progress

ย 

Our Crystal Datasheet Values

work in progress

ย 

Calculations

work in progress

ย 

Conclusion

work in progress