Working with
Microcontrollers

I write bare metal code, optimize performance, and occasionally break things. This is where I document what I learn.

$ cat current_setup.txt
Platform: ARM Cortex-M4 @ 168MHz
Memory: 192KB RAM, 1MB Flash
Toolchain: gcc-arm-none-eabi -O3
$ ./run_benchmark
Baseline: 2847 cycles → Optimized: 847 cycles

What I Work On

Mostly microcontrollers and getting them to do more with less

Real-Time Systems

RTOS implementations, interrupt-driven code, trying to keep timing deterministic on tiny MCUs

🔧

Performance

Sometimes Assembly, DMA when it makes sense, profiling with cycle counters

📡

Wireless Stuff

BLE, LoRa, ESP-NOW. Usually trying to reduce power consumption or increase throughput

🎯

Bare Metal

Direct register access, custom bootloaders, avoiding HAL libraries when they get in the way

Recent Experiments

Things I've been working on lately

ESP32 Low Power

Getting ESP32 to 12µA Sleep Current

Documented the process of optimizing deep sleep mode. Mostly power domain tweaks and GPIO configuration.

12µA Sleep
800ms Wake
STM32 DMA

High-Speed ADC with DMA

Set up circular DMA buffer for 2 MSPS sampling. Managed to keep CPU mostly idle during acquisition.

2M Samples/s
6% CPU
ARM Bootloader

Minimal Bare Metal Bootloader

Wrote a bootloader from scratch. No vendor SDK, just startup code and linker scripts.

2KB Size
50ms Boot
View All Experiments