Page 10 of 10

Re: Taking a look at STM32G0 series

Posted: Sat Nov 04, 2023 10:06 pm
by dannyf
R2 seemed too small. As is R1 - I usually go for the highest value / lowest drive. often 10M.

load capacitance will depend on your particular crystal. I often use 15-22pf. OK to omit for most high frequency crystals.

I prefer dual-input NAND (HC132): you can use the other input pin as OE.

The layout should generally follow that for standard crystal oscillators:
Pin1: OE/NC
Pin4: GND
Pin5: Output
Pin8: Vcc

Re: Taking a look at STM32G0 series

Posted: Sun Nov 05, 2023 5:10 am
by ag123
thanks I'd try with higher value for R2 and R1, but that if 10 M works for R1, my guess is it'd likely oscillate even if it isn't there, but I'd guess that'd vary.

for R2 I'm thinking perhaps it should only be in series with the crystal, but that according to the wikipedia article, it reduce the chance the oscillator locks on to overtone frequencies, and I think it may help prevent 'damage' to the crystal if in case the drive is 'too high', my guess is in stm32 etc, the drive may be deliberately limited by some resident resistance that is there when fabricated. But that for dedicated 74lvc, the resistance may be lower, thus a higher drive currents e.g. a wider mosfet channel. a thing is R2 reduce the Q factor of the circuit, hence I'm a little concerned that too hgh R2 may cause it not to oscillate. maybe I'd try 1k instead

one of those experiments I may try is to patch it on a breadboard, but that at those high frequencies, a feeling is it may work differently / worse vs soldered on a pcb

Re: Taking a look at STM32G0 series

Posted: Sun Nov 05, 2023 4:35 pm
by dannyf
for high speed crystals, just putting the crystal on would be sufficient, even on a breadboard. 32Khz crystlas require more care.

I would also put R1 directly across the gate's input / output.

Re: Taking a look at STM32G0 series

Posted: Sun Nov 05, 2023 9:49 pm
by ag123
thanks would try that, I noted that for R1 it has a 'special function'.
In practical terms, connecting a resistor across from the output of the not gate to the input would in itself cause it to oscillate.
i'd guess that is the reason for the high R1 value, and that the crystal I'd guess provides a lower impedance path when it is actually oscillating, as well as phase shift thereby making it lock on to the crystal frequency - likely series resonance.
without R1, it'd depend on 'noises' when the oscillator is switched on to startup, and probably requires caps to provide that extra drive, but that at those mhz frequencies, even quite high caps like >20pf may look like a 'short circuit' to gnd and hence probably not good to sustain oscillations.

Re: Taking a look at STM32G0 series

Posted: Mon Nov 06, 2023 11:58 am
by dannyf
R1 turns a NOT gate into a high gain linear amplifier. It was one of the tricks during the cmos days.

You can also think of R1 plus stray capacitance to form a RC oscillator that gets the oscillator started.