# External oscilator on stm32f030

I am not sure if I calculated R_ext right. I am planning to use this oscilator. According to the document the calculation for R_ext is:

R_ext = 1 / (2 * π * F * C_L2)


My C_L1 and C_L2 are both 20pF and the oscillator has a frequency of 8MHz. So R_ext would add up to 1 / (2 * π * 8 MHz * 20pF which gives a Resistor with the value 994.718394 ohm the next E-Value would be 1k.

So what I wanted to ask, if this would work and if my calculations and interpretations are correct.

Rext calculation looks correct. However the capacitor calculations should take stray and pin capacitances into account as well, so in reality you need smaller capacitors, maybe 10pF. In some STM32 documentations there was another formula that Rext should be about 5 to 6 times the crystal ESR, so maybe anything between 470R and 1k would work, though 1k sounds a bit high. Many designs just omit Rext or place 0R link there to fine tune it later.

That formula is just to get a starting value of Rext. You hardly ever require Rext to equal the capacitive reactance of the output capacitor but you do need some value for Rext and this is quite often delivered by the silicon itself i.e. the gate's output has several ohms impedance and this is quite enough to provide the little extra phase shift needed to allow an oscillator like this (or the Colpitts) to start up properly.

Yes, you do need some resistance but not as much as the formula you linked is hinting at.

If you are trying to design an oscillator circuit for a PCB design, first determine if you need to add a resistor to limit the power dissipated by your crystal. This is not normally a problem for standard crystals at 8 MHz running from power supplies up to 5 volts but can be a problem for some more specialized crystals such as those capable of withstanding hi-G environments or some watch crystals that normally operate on much lower supply voltages.

So, on finding out that you don't need to limit power, choose a resistor like 100 ohms that would mask any output impedance changes from the silicon.

Other information as to why Rext is needed can be found in my answer here.

• Ah, a double down vote attack - maybe there is some error in what I wrote so if anyone can shed light, please do point it out to me. – Andy aka Jun 6 at 11:38