Netcrook Logo
👤 NEONPALADIN
🗓️ 18 Dec 2025  

Overclocked Ambitions: How a Bare-Metal STM32 MCU Chased Down a Pentium

Subtitle: A deep dive into pushing STM32F103 microcontrollers to their limits - and pitting them against 1990s desktop giants.

In the shadowy corners of microcontroller hacking, the pursuit of raw speed is as much art as science. What happens when you take a humble STM32F103, crank its clock from a conservative 8 MHz to a roaring 72 MHz, and unleash the venerable Dhrystone benchmark? The answer: a silicon underdog nipping at the heels of a classic Pentium - and a lesson in just how far bare-metal tinkering can push yesterday’s hardware.

Inside the Clockwork: Breaking the 8 MHz Barrier

Out of the box, the STM32F103’s Cortex-M3 core ticks along at 8 MHz, powered by its internal oscillator - a speed that feels glacial in today’s world. But by reconfiguring the system clock to use the external high-speed oscillator (HSE) and feeding it through a phase-locked loop (PLL), hackers can ramp up the frequency to its rated maximum: 72 MHz. This isn’t a trivial flick of a switch. Every subsystem - Flash memory, internal buses (AHB, APB), and peripherals - must be tuned in lockstep. Flash memory, in particular, demands extra wait states and prefetching to keep pace, or the MCU risks tripping over its own instructions.

The process is a mix of register gymnastics and precise timing: enabling the HSE, configuring the PLL’s multiplication factor (set to x9 for 8 MHz in, 72 MHz out), adjusting bus prescalers, and finally switching the clock source. A single misstep can lock up the chip or send data flying out of sync. But when done right, the reward is a microcontroller running at nearly ten times its default speed - without a single line of operating system in sight.

Dhrystone: An Old Benchmark in a New Race

To measure the impact, the Dhrystone benchmark - once the gold standard for CPU comparisons - was ported to this bare-metal setup. Despite its age and limitations (integer math only, no floating point), Dhrystone provides a window into the raw computational muscle of a system. After 100 million runs, the STM32F103 clocked in at roughly 288,184 Dhrystones Per Second, or about 164 MIPS - numbers that echo those of early Pentium processors.

Of course, the comparison is imperfect. Dhrystone is notorious for its simplicity and susceptibility to compiler optimizations. Still, the result is striking: a microcontroller that once blinked LEDs in hobbyist projects now matches the integer crunching of ‘90s desktop hardware. The experiment also highlights the challenges of benchmarking embedded systems - every tweak, from compiler flags to UART output, can swing results wildly.

Conclusion: Chasing Giants, One Clock Cycle at a Time

Pushing the STM32F103 to its limits is more than a technical stunt - it’s a reminder of how far embedded hardware has come, and how much potential still lurks in “obsolete” chips. As more comprehensive benchmarks like CoreMark take center stage, the game of squeezing every drop of performance from bare metal continues. For hackers and engineers alike, the thrill is in the chase - and the realization that yesterday’s giants can still be caught.

WIKICROOK

  • Phase: A phase is one of several power lines in electrical systems, used to generate a rotating magnetic field for smoother and more efficient motor operation.
  • Prescaler: A prescaler reduces a clock signal’s frequency before it reaches peripherals or buses, ensuring proper timing and secure operation in embedded systems.
  • Wait State: A wait state is a CPU pause during memory access, allowing slower memory (like Flash) to synchronize with a faster processor and prevent data errors.
  • Dhrystone: Dhrystone is a benchmark that measures processor integer performance, providing a standardized metric for comparing CPU speeds, especially in embedded systems.
  • Bare Metal: Bare metal is running software directly on hardware, without an operating system, often used for security, performance, or specialized computing tasks.
STM32F103 Dhrystone benchmark Bare metal

NEONPALADIN NEONPALADIN
Cyber Resilience Engineer
← Back to news