Page 1 of 1
32k crystal won't oscillate
Posted: Fri Jul 07, 2023 3:28 pm
by ag123
for a 1st time, I witness a non-oscillating 32k crystal for myself.
I'm using a maple mini (clone)
https://stm32-base.org/boards/STM32F103 ... Clone.html
The thing is this board don't have a 32k crystal patched. So I get one of those 32k crystals in a can
https://www.aliexpress.com/w/wholesale-32768.html
those are delightful, low costs, tiny
In the past, most of the maple mini works if I simply connect that 'crystal can' across PC14, PC15, no load capacitor etc.
I figured that at 32Khz, 10pf 'load capacitors' is practically 'open circuit', so I just omitted them

and it is from this same 'batch' i.e. I ordered a bunch of them, previously, they 'just work', patch it and it works.
here is how to patch a 32khz crystal, it works quite well if it works actually

- maple mini (clone) with 32k crystal
- maplemini32k.jpg (79.99 KiB) Viewed 2116 times
But this time round, it doesn't oscillate. Apparently, the issue is quite common.
https://www.google.com/search?q=stm32+3 ... scillating
But for now rather than to figure out how to fix this, I dusted off a blue pill that has a working 32k crystal and used that instead
Re: 32k crystal won't oscillate
Posted: Fri Jul 07, 2023 9:44 pm
by dannyf
Earlier stm32 and stm8 chips do tend not to oscillate. Adding caps usually resolve that. Or a parallel resistor.
High speed xtals tend not to need caps.
Re: 32k crystal won't oscillate
Posted: Sat Jul 08, 2023 4:55 am
by ag123
I'm thinking of doing some tests later
e.g. to try this experiment
https://www.giangrandi.ch/electronics/r ... ownq.shtml
it is quite feasible to study the 32k crystal using the on board ADC to see if after all there is a problem with the crystal itself.
but it takes a 'little' sketch to do that. The load caps after all may not be necessary. Accordingly, those load caps reduce the gain a little as well.
oh, but i'd try putting caps 1st to see if that works
another way which i'm not sure if it may work could be to generate square waves say at PC14 to try to 'kick start' the oscillator.
But that that would also depend on the Q factor if it'd self oscillate on a bit of excitation.
Re: 32k crystal won't oscillate
Posted: Sat Jul 08, 2023 11:37 am
by dannyf
put your finger on it to see if you can get it started.
high speed crystals generally don't need a cap to get it going but low speed crystals generally do need a cap.
Re: 32k crystal won't oscillate
Posted: Sat Jul 08, 2023 2:39 pm
by ag123
tried that, didn't work, partly as the crystal is a little isolated on its own as in the photo. The cap is a good idea to try, just that I'd need to dig to the bottom of the pile to find it
but that 10pf is pretty small, I'm thinking if I'd just use a little aluminium foil and sandwich a thin piece of paper between to make that, just that aluminium foil is hard to solder on
Re: 32k crystal won't oscillate
Posted: Sat Jul 08, 2023 4:08 pm
by dannyf
a quick and dirty way is to put one insulated wire and wound it up on another insulated wire. or just twisting two insulated wires together.
Re: 32k crystal won't oscillate
Posted: Sat Jul 15, 2023 8:48 am
by LyleWaters
dannyf wrote: Fri Jul 07, 2023 9:44 pm
Earlier stm32 and stm8 chips do tend not to oscillate. Adding caps usually resolve that. Or a parallel resistor.
High speed xtals tend not to need caps.
Thank you for sharing that information. You are correct that in some cases, certain STM32 and STM8 microcontrollers may require additional components like capacitors or resistors to ensure stable oscillation of the crystal or resonator. For some low-speed or less stable oscillators, adding capacitors in parallel with the crystal or resonator can help improve stability. The capacitors are typically connected between the oscillator pins and ground. However, higher-speed crystals tend to have built-in capacitors, which needs for additional external capacitors in most cases. It is important to always refer to the specific datasheet and reference manual provided by STMicroelectronics for the STM32 or STM8 microcontroller you are working with. These documents provide detailed information on recommended crystal or resonator connections, as well as any additional components required for stable and reliable operation. If you are experiencing specific issues with oscillator stability, it is best to consult the manufacturer's datasheet, reference or support resource for guidance on values. Components and circuits are recommended to ensure proper oscillation.