<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Clocks &amp; Timing on Embedded Systems Development</title><link>https://applied-ee.github.io/embedded/docs/foundations/clocks-and-timing/</link><description>Recent content in Clocks &amp; Timing on Embedded Systems Development</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://applied-ee.github.io/embedded/docs/foundations/clocks-and-timing/index.xml" rel="self" type="application/rss+xml"/><item><title>Oscillator Sources — Internal RC vs External Crystal</title><link>https://applied-ee.github.io/embedded/docs/foundations/clocks-and-timing/oscillator-sources/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/embedded/docs/foundations/clocks-and-timing/oscillator-sources/</guid><description>&lt;h1 id="oscillator-sources--internal-rc-vs-external-crystal"&gt;Oscillator Sources — Internal RC vs External Crystal&lt;a class="anchor" href="#oscillator-sources--internal-rc-vs-external-crystal"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Every microcontroller needs a clock source, and the choice between internal RC oscillators, external crystals, and MEMS oscillators determines accuracy, startup speed, cost, and board complexity. The tradeoffs are well-defined: internal RC is free and fast to start but imprecise, while an external crystal is accurate but adds components and startup delay. Understanding when each source is sufficient — and when it is not — prevents both over-engineering simple projects and under-specifying timing-critical ones.&lt;/p&gt;</description></item><item><title>Clock Trees &amp; PLL Configuration</title><link>https://applied-ee.github.io/embedded/docs/foundations/clocks-and-timing/clock-trees-and-plls/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/embedded/docs/foundations/clocks-and-timing/clock-trees-and-plls/</guid><description>&lt;h1 id="clock-trees--pll-configuration"&gt;Clock Trees &amp;amp; PLL Configuration&lt;a class="anchor" href="#clock-trees--pll-configuration"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The clock tree is the distribution network that transforms a base oscillator frequency into the various clock domains an MCU needs: a fast system clock for the CPU core, slower bus clocks for peripherals, and dedicated clocks for USB, ADC, and other subsystems. At the center of most clock trees sits a PLL (Phase-Locked Loop) that multiplies the input frequency up to the desired system clock speed. Getting the clock tree wrong produces symptoms ranging from peripherals running at the wrong speed to hard faults from flash access violations.&lt;/p&gt;</description></item><item><title>Clock Output &amp; Measurement</title><link>https://applied-ee.github.io/embedded/docs/foundations/clocks-and-timing/clock-output-and-measurement/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/embedded/docs/foundations/clocks-and-timing/clock-output-and-measurement/</guid><description>&lt;h1 id="clock-output--measurement"&gt;Clock Output &amp;amp; Measurement&lt;a class="anchor" href="#clock-output--measurement"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Verifying that the clock tree is configured correctly requires measuring actual frequencies, not just trusting register settings. Most STM32 and other ARM Cortex-M microcontrollers provide MCO (Microcontroller Clock Output) pins that route internal clock signals to a GPIO, making them directly measurable with an oscilloscope or frequency counter. This capability turns clock debugging from guesswork into straightforward measurement.&lt;/p&gt;
&lt;h2 id="mco-pin-configuration"&gt;MCO Pin Configuration&lt;a class="anchor" href="#mco-pin-configuration"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;MCO pins output a selectable internal clock source on a standard GPIO. On STM32F4 devices, MCO1 (PA8) can output HSI, HSE, LSE, or the PLL clock, while MCO2 (PC9) can output SYSCLK, PLLI2S, HSE, or the PLL clock. Each MCO has a configurable prescaler (1, 2, 3, 4, or 5) to bring high-frequency clocks within range of measurement equipment.&lt;/p&gt;</description></item><item><title>RTC &amp; Low-Speed Clock Domains</title><link>https://applied-ee.github.io/embedded/docs/foundations/clocks-and-timing/rtc-and-low-speed-clocks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/embedded/docs/foundations/clocks-and-timing/rtc-and-low-speed-clocks/</guid><description>&lt;h1 id="rtc--low-speed-clock-domains"&gt;RTC &amp;amp; Low-Speed Clock Domains&lt;a class="anchor" href="#rtc--low-speed-clock-domains"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The low-speed clock domain operates independently of the main system clock, providing timekeeping and watchdog functionality that persists through sleep modes, resets, and even main power loss (with battery backup). The 32.768 kHz crystal frequency is not arbitrary — it equals 2^15, which divides down to exactly 1 Hz using a simple 15-stage binary counter. This domain is home to the RTC (Real-Time Clock), wakeup timers, and the independent watchdog.&lt;/p&gt;</description></item></channel></rss>