Down the Rabbit Hole of STM32 Clock Options

Once you venture beyond the tame, comfortable walls of the 8-bit microcontroller world it can feel like you’re stuck in the jungle with a lot of unknown and oft scary hazards jut waiting to pounce. But the truth is that your horizons have expanded exponentially with the acceptable trade-off of increased complexity. That’s a pretty nice problem to have; the limitation becomes how much can you learn.

Here’s a great chance to expand your knowledge of the STM32 by learning more about the system clock options available. We’ve been working with STM32 chips for a few years now and still managed to find some interesting tidbits — like the fact that the High Speed External clock source accepts not just square waves but sine and triangle waves as well, and an interesting ‘gotcha’ about avoiding accidental overclocking. [Shawon M. Shahryiar] even covers one of our favorite subjects: watchdog timers (of which there are two different varieties on this chip). Even if this is not your go-to 32-bit chip family, most chips have similar clock source features so this reading will help give you a foothold when reading other datasheets.

There is a clock diagram at the top of that post which is small enough to be unreadable. You can get a better look at the diagram on page 12 of this datasheet. Oh, and just to save you the hassle of commenting on it, the chip shown above is not an f103… but it just happened to be sitting on our desk when we started writing.

20 pounds and a gut feeling yields a configurable Rubidium atomic clock source

rubidium-source-for-twenty-pounds

So you see an image like this and the description “Aircraft stable oscillator” on an eBay listing for twenty pounds (about thirty bucks), what do you do? If you’re [Alecjw] you buy the thing and crack it open to find an atomic clock source inside. But he really went the distance with this one and figured out how to reconfigure the source from the way it was set up in the factory.

First off, the fact that it’s made for the aerospace industry means that the craftsmanship on it is simply fantastic. The enclosure is machined aluminum and all of the components are glued or otherwise attached to the boards to help them stand up to the high-vibrations often experienced on a plane. After quite a bit of disassembly [Alec] gets down to a black box which is labeled “Rubidium Frequency Standard”… jackpot! He had been hoping for a 10 MHz signal to use with his test equipment but when he hooked it up the source was putting out 800 kHz. With a bit more investigation he figured out how to reconfigure the support electronics to get that 10 Mhz source. We think you’re going to love reading about how he used a test crystal during the reconfiguration step.

Once he knew what he had he returned to the eBay seller and cleared out the rest of his stock.

[Thanks DIY DSP]