EmbeddedRelated.com

Ten Little Algorithms, Part 8: Miller-Rabin Primality Test (and Living with Uncertainty)

Jason SachsJason Sachs May 18, 2026

Part 8 of the Ten Little Algorithms series: A look at the Miller-Rabin primality test, along with Pollard's rho algorithm for factoring, and some perspectives on very low levels of uncertainty.


Beyond the Packet: Designing Reliable Serial Communication for Embedded Systems

Prabo SemasinghePrabo Semasinghe May 4, 2026

Serial communication between microcontrollers sounds simple until the protocol quietly breaks your system. Prabo Semasinghe walks through the design steps for building a robust communication framework: packet structure, error detection, acknowledgment handling, state machine design, and the failure-mode testing that actually proves it works.


Embedded Development Is Broken. Here's the Strategy I'm Betting My Company On.

Joe SchneiderJoe Schneider April 21, 2026

Here's a 79-word summary: Embedded software complexity is growing about 4x per decade while developer productivity grows 1.5x, and regulations like the EU CRA are widening the gap further. After running a firmware services company through this shift, I've come to see three things separating the teams that are pulling ahead: using AI where the work is actually hard, designing security in from day one, and reading the standards that govern their market (62304, 26262, CRA) before writing code, not after.


Your Unit Tests Won't Find the Wolves: Why Embedded Developers Should Be Fuzzing

Ryan TorvikRyan Torvik April 18, 2026

You test the happy paths. You check the well-formatted packets and the expected inputs. But real users don't read manuals, and real data doesn't follow your protocol spec. Fuzzing throws millions of randomized inputs at your code to find the crashes you never thought to look for. Here's why it matters for embedded systems.


Never use Float or Integer

Mark HermelingMark Hermeling March 18, 20264 comments

Ada treats numbers as more than just numbers, and that changes how embedded code fails. This post shows why you should avoid using Float and Integer directly, then demonstrates how distinct types, ranges, and subtypes let the compiler catch unit mix-ups and out-of-range values before runtime. It also shows the same code running on a Raspberry Pi Pico, and briefly introduces SPARK for proving correctness.


Breaking AES with an Oscilloscope

Nathan JonesNathan Jones October 1, 2025

AES is a powerful encryption algorithm that protects some our most important secrets. But did you know that many devices are inadvertently leaking the value of their private key through their power pins?! Join me in this special preview of my upcoming workshop at the Embedded Systems Summit (14-16 October 2025 in San Jose, CA) as we explore the world of hardware security and discover just how easy it could be to break AES encryption with only an oscilloscope and some math.


How to Achieve Deterministic Behavior in Real-Time Embedded Systems

Lance HarvieLance Harvie April 21, 20253 comments

Ensuring deterministic behavior in real-time embedded systems is paramount for their reliability and performance. The ability to predict precisely how a system will respond to various inputs at any given time is crucial in critical applications such as medical devices, aerospace systems, and automotive safety mechanisms. Achieving deterministic behavior involves meticulous design, stringent testing, and adherence to strict timing constraints.


How to Design Reliable Reset Circuits for Embedded Microcontrollers

Lance HarvieLance Harvie April 21, 2025

In the world of embedded systems, the reset circuit is a critical component that ensures the microcontroller starts up correctly and recovers gracefully from unexpected events like power fluctuations or software crashes. A poorly designed reset circuit can lead to erratic behavior, system lockups, or even permanent damage to the microcontroller. For embedded engineers, designing a reliable reset circuit is essential for ensuring the stability and robustness of the system.


Hidden Gems from the Embedded Online Conference Archives - Part 3

Tim GuiteTim Guite April 4, 20252 comments

Jack Ganssle shows us what we can learn by studying previous failures - and why this is essential for anyone working in embedded systems.


Hidden Gems from the Embedded Online Conference Archives - Part 2

Tim GuiteTim Guite March 20, 20252 comments

A look back at a deep dive into the Mars Perseverance flight software from one of the technical leads at JPL.


Learning Rust For Embedded Systems

Steve BranamSteve Branam November 12, 2021

Rust eliminates whole classes of memory and concurrency bugs, making it a compelling choice for embedded projects, and the author recommends it for the VolksEEG project after a rapid evaluation. The post connects Rust fundamentals such as ownership and borrowing, RAII, traits, and unsafe blocks to familiar embedded patterns. It also provides a curated on-ramp of videos, books, and tools like Cargo, RTIC, and probe-rs to get hands-on quickly.


Modern C++ in Embedded Development: (Don't Fear) The ++

Amar MahmutbegovicAmar Mahmutbegovic June 13, 20233 comments

While C is still the language of choice for embedded development, the adoption of C++ has grown steadily. Yet, reservations about dynamic memory allocation and fears of unnecessary code bloat have kept many in the C camp. This discourse aims to explore the intricacies of employing C++ in embedded systems, negotiating the issues of dynamic memory allocation, and exploiting the benefits of C++ offerings like std::array and constexpr. Moreover, it ventures into the details of the zero-overhead principle and the nuanced distinctions between C and C++. The takeaway? Armed with the right knowledge and a careful approach, C++ can indeed serve as a powerful, safer, and more efficient tool for embedded development.


Linear Feedback Shift Registers for the Uninitiated, Part XVI: Reed-Solomon Error Correction

Jason SachsJason Sachs June 19, 2018

Jason Sachs demystifies Reed-Solomon codes with hands-on examples and pragmatic tips for embedded engineers. The article shows why RS encoding is just polynomial division in GF(2^m), why decoding is mathematically heavier, and how to implement encoders in Python and in C-friendly form using LFSRs and table-driven methods. Read this for working code, generator-polynomial examples, and an embedded-minded view of RS practicalities.


Linear Feedback Shift Registers for the Uninitiated, Part XVIII: Primitive Polynomial Generation

Jason SachsJason Sachs August 6, 20182 comments

Jason Sachs walks through how to find primitive polynomials for GF(2) LFSRs, moving from naive exhaustive checks to smarter synthetic constructions. The article compares sieve and constructive methods, shows practical optimizations like parity checks and companion-matrix updates, and demonstrates decimation plus Berlekamp-Massey to generate all primitives from one seed; it also teases a novel Falling Coyote Algorithm for additional speedups.


Elliptic Curve Cryptography - Basic Math

Mike RosingMike Rosing October 10, 2023

An introduction to the math of elliptic curves for cryptography. Covers the basic equations of points on an elliptic curve and the concept of point addition as well as multiplication.


Lessons Learned from Embedded Code Reviews (Including Some Surprises)

Jason SachsJason Sachs August 16, 20152 comments

Jason Sachs recounts a round of motor-controller code reviews and the practical lessons his team learned about quality and tooling. He explains how a simple "ready for review" checklist and automated style checks kept meetings focused on substantive issues, and why choosing the right review tool matters after discovering lost comments in Stash. Read for concrete tips on process, subgit mirroring, vera++, and Upsource.


How Embedded Linux is used in Spacecrafts !

George EmadGeorge Emad February 1, 20246 comments

This article dives into the application of Linux in spacecraft, examining the challenges it poses and proposing potential solutions. Real-life examples will be discussed, while also addressing the drawbacks of employing Linux in safety-critical missions.


Bad Hash Functions and Other Stories: Trapped in a Cage of Irresponsibility and Garden Rakes

Jason SachsJason Sachs January 28, 20141 comment

A tiny filename decision in MATLAB's publish() can silently swap rendered equations, and Jason Sachs shows why that matters. He reproduces the bug, walks through hash-function basics and collision math, and contrasts safe and unsafe caching strategies. The piece then broadens into practical lessons about software fringes, legacy constraints, and the usability traps that leave engineers repeatedly stumbling over avoidable design choices.


Introduction to Microcontrollers - Ada - 7 Segments and Catching Errors

Mike SilvaMike Silva September 22, 20145 comments

Mike demos an Ada implementation of a multiplexed 7-segment driver on the STM32F407 Discovery board, highlighting Ada idioms like protected objects for ISRs and packed-boolean GPIO mapping. The post shows practical timer setup for Timer 6, how to avoid ARR/CNT races, and how Ada's runtime range checks plus a last-chance handler surface out-of-range errors with file and line diagnostics.


Favorite Tools: C++11 std::array

Matthew EshlemanMatthew Eshleman February 26, 20172 comments

Firmware teams that avoid malloc or new need safer alternatives, and this post makes a strong case for C++11 std::array as that alternative. It highlights zero-overhead, type-safe, compile-time buffers and points to an ESP32 LED-strip demo where NUM_PIXELS_ fixes RAM usage at build time. Read it to see std::array used with std::rotate, passed to C libraries via data(), and as a low-risk path to std::vector later.