Learn how Embedded C’s named address spaces let you place constant tables directly in flash, saving RAM and removing runtime copies—complete with a GCC‑AVR example, portability tips, and verification steps.
When accessing hardware registers in embedded C, compiler optimizations can silently break your code. The volatile keyword ensures the compiler reads the register each time. This article explains why volatile is essential, shows a GPIO ISR example, and discusses trade‑offs.
On FPU-less Cortex-M0/M0+ cores, soft-float can dominate a control loop. This post explains when Q15 fixed-point helps, how to handle Q30 intermediates and saturation, and a verifiable decision rule.
How and why to use volatile for memory-mapped hardware registers in embedded C, with a worked register-map example, assembly-level verification, and the limits of what volatile guarantees.
An architecture note on a lock-free single-producer/single-consumer ring buffer for moving data from an ISR to the main loop in embedded C: minimal design, trust boundaries, overflow policy, checks, and failure modes.
Your UART polling loop works at -O0 but hangs at -O2. The culprit: missing volatile on memory-mapped registers. A worked example shows why volatile exists, how to apply it correctly, what it doesn't do, and how to verify the generated assembly.
On microcontrollers without a hardware FPU, float math is emulated in software and costs dearly. This guide shows how Q-format fixed-point arithmetic works, with a complete Q15 sensor-filter example, overflow analysis, and on-target verification steps.
Learn how to build a fast, interrupt‑safe, single‑producer/single‑consumer circular buffer in C. The post covers sizing, head/tail atomicity, power‑of‑two optimizations, pitfalls, and a UART ISR example.