Can an RTOS be really real-time?
Real-Time Operating Systems are meant for real-time applications. But with conventional shared-state concurrency and blocking, can you honestly know the worst-case execution time of an RTOS thread?
Memory Mapped I/O in C
Interacting with memory mapped device registers is at the base of all embedded development. Let's explore what tools the C language - standard of the industry - provide the developer with to face this task.
Cortex-M Exception Handling (Part 1)
This article describes how Cortex-M processors handle interrupts and, more generally, exceptions, a concept that plays a central role in the design and implementation of most embedded systems.
Creating a GPIO HAL and Driver in C
Creating a GPIO Hardware Abstraction Layer (HAL) in C allows for flexible microcontroller interfacing, overcoming the challenge of variability across silicon vendors. This method involves reviewing datasheets, identifying features, designing interfaces, and iterative development, as detailed in the "Reusable Firmware" process. A simplified approach prioritizes essential functions like initialization and read/write operations, showcased through a minimal interface example. The post also highlights the use of AI to expedite HAL generation. A detailed GPIO HAL version is provided, featuring extended capabilities and facilitating driver connection through direct assignments or wrappers. The significance of a configuration table for adaptable peripheral setup is emphasized. Ultimately, the blog illustrates the ease and scalability of developing a GPIO HAL and driver in C, promoting hardware-independent and extensible code for various interfaces, such as SPI, I2C, PWM, and timers, underscoring the abstraction benefits.
C to C++: Templates and Generics – Supercharging Type Flexibility
"C to C++: Templates and Generics – Supercharging Type Flexibility" illuminates the rigidity of C when managing multiple types and the confusion of code replication or macro complexity. In contrast, C++ offers templates, acting as type-agnostic blueprints for classes and functions, which allows for the creation of versatile and reusable code without redundancy. By using templates, developers can define operations like add once and apply them to any data type, simplifying codebases significantly. Generics further this concept, enabling a single code structure to handle diverse data types efficiently—a boon for embedded systems where operations must be performed on varying data, yet code efficiency is critical due to resource limitations. The blog walks through practical applications, showcasing how templates streamline processes and ensure type safety with static_assert, all while weighing the pros and cons of their use in embedded software, advocating for careful practice to harness their full potential.
Linear Feedback Shift Registers for the Uninitiated, Part I: Ex-Pralite Monks and Finite Fields
Later there will be, I hope, some people who will find it to their advantage to decipher all this mess. — Évariste Galois, May 29, 1832 I was going to call this short series of articles “LFSRs for Dummies”, but...
Help, My Serial Data Has Been Framed: How To Handle Packets When All You Have Are Streams
Today we're going to talk about data framing and something called COBS, which will make your life easier the next time you use serial communications on an embedded system -- but first, here's a quiz: Quick Diversion, Part I: Which of the...
The volatile keyword
Although the C keyword volatile is very useful in embedded applications, care is needed to use it correctly and vigilance is required to ensure its correct implementation by compilers.
Analog-to-Digital Confusion: Pitfalls of Driving an ADC
Imagine the following scenario:You're a successful engineer (sounds nice, doesn't it!) working on a project with three or four circuit boards. More than even you can handle, so you give one of them over to your coworker Wayne to design....
Your architecture was decided before you opened the schematic
Engineering teams often treat requirements as a simple feature checklist, but they actually hold the blueprint for your software architecture. By analyzing constraints collectively rather than in isolation, you can define critical architectural patterns—such as task scheduling and abstraction levels—long before the first schematic is drawn. This proactive approach eliminates wasted complexity, reduces development time, and allows software needs to inform hardware choices early in the cycle. Discover how to shift your design mindset to build lean, purposeful systems that align perfectly with business objectives from day one.
My Lowest-Friction Embedded Project Was Also the One That Shouldn't Have Worked
Ralph Hempel recounts the LEGO Powered Up rework that, against every external constraint, turned into the lowest-friction embedded development environment of his career. The talk connects the specific tools and habits that made it work to five soft qualities that any struggling team can start building with small experiments, not big-bang process changes.
Beyond the Packet: Designing Reliable Serial Communication for Embedded Systems
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.
The Data Problem Slowing Down Semiconductor Adoption
Silicon is shipping faster than ever. Devices are not. The 18 to 36 month gap between a chip becoming available and a product reaching the market is now almost entirely software integration, written by hand, rewritten for every operating system and every safety target. The fix isn't more engineers or better tools. It's better data, and a shared way to describe how chips actually behave.
I Stopped Testing Embedded Systems by Hand. Here's What Replaced It.
Everardo Garcia walks through the shift from manual, terminal-based system-level testing to automated tests that run during development. He shows how OpenHTF (a framework originally built at Google for manufacturing lines) plus a laptop, a USB cable, and ~150 lines of Python closes the functional testing gap most embedded teams carry, and how spec-driven prompting with GitHub Copilot makes writing plugs and phases fast enough to keep up.
Embedded Development Is Broken. Here's the Strategy I'm Betting My Company On.
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.
Finite State Machines (FSM) in Embedded Systems (Part 5) - From One FSM to Many
Traditionally, complex systems are implemented using multi-threading and mutexes. Trying to scale up this approach usually results in a nightmare of data races and hidden bugs. A single Finite State Machine may bring order to chaos in applications, but cannot be scaled beyond a limit. In this installment, we explore the Actor Model: a shift from shared state to communicating state machines. Discover how treating FSMs as independent, message-passing entities can eliminate concurrency issues, simplify testing, and improve your embedded architecture.
Your Unit Tests Won't Find the Wolves: Why Embedded Developers Should Be Fuzzing
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.
Quickfire Heuristics: A Fast Usability Evaluation Framework for Lean Hardware Teams
That device with the single LED that requires you to count blink patterns just to understand system status. The button you must hold for 8 seconds, which also performs four other actions depending on hold duration. These are not accidents of negligence; they are the predictable output of development processes that have no rigorous usability evaluation component. Usability tends to slip through the gaps of standard engineering reviews, surfacing late, when design flexibility is already gone. This article introduces a framework that adapts Jakob Nielsen's Ten Usability Heuristics, for hardware and embedded systems, translating each principle into concrete evaluation questions for physical interfaces, firmware state machines, constrained displays, and cross-layer interactions. Using a smartwatch as the running example, it also introduces a structured session format, maps the framework to key lifecycle stages, and extends it to manufacturing, test, and field service contexts.
OOKLONE: a cheap RF 433.92MHz OOK frame cloner
Introduction A few weeks ago, I bought a set of cheap wireless outlets and reimplemented the protocol for further inclusion in a domotics platform. I wrote a post about it here: http://www.embeddedrelated.com/showarticle/620.php Following...
There's a State in This Machine!
An introduction to state machines and their implementation. Working from an intuitive definition of the state machine concept, we will start with a straightforward implementation then we evolve it into a more robust and engineered solution.
Small Language Models (SLMs): The Future of AI is Smaller, Faster, and Closer to the Edge
AI industry is shifting from a "bigger is better" mentality to a focus on efficiency, localization, and real-world utility. The article argues that the AI industry is pivoting from massive, cloud-bound models toward Small Language Models (SLMs) designed for efficiency, speed, and edge deployment. Driven by the need to overcome cloud-centric hurdles like high latency, bandwidth costs, and privacy risks, SLMs (ranging from 100M to 14B parameters) leverage architectural innovations such as quantization, sparse attention, and high-quality synthetic data to deliver specialized intelligence on local hardware. Rather than replacing large models, SLMs represent a shift toward a hybrid intelligence future where the cloud provides depth while the edge provides real-time, sustainable action, ultimately moving the focus of AI progress from raw parameter count to practical, real-world utility.
Can an RTOS be really real-time?
Real-Time Operating Systems are meant for real-time applications. But with conventional shared-state concurrency and blocking, can you honestly know the worst-case execution time of an RTOS thread?
Visual Studio Code Extensions for Embedded Software Development
Visual Studio Code has become one of the most popular IDEs in the world. To date, software developers have downloaded it more than 40 million times! I suspect you’ve at least heard of it, if not already attempting to use it. Visual Studio Code...
Lost Secrets of the H-Bridge, Part V: Gate Drives for Dummies
Learn the most important issues in power MOSFET and IGBT gate drives: - Transistor behavior during switching - Calculating turn-on and turn-off times - Passive components used between gate drive IC and transistor - Reverse recovery - Capacitively-coupled spurious turn-on - Factors that influence a good choice of turn-on and turn-off times - Gate drive supply voltage management - Bootstrap gate drives - Design issues impacting reliability
Cracking the (embedded) Coding Interview
You never forget the day you land your first job. The thrill of receiving that call from your recruiter to tell you that you bagged your dream role! The relief when you finally see the offer letter you’ve been working towards for...
You Don't Need an RTOS (Part 1)
In this first article, we'll compare our two contenders, the superloop and the RTOS. We'll define a few terms that help us describe exactly what functions a scheduler does and why an RTOS can help make certain systems work that wouldn't with a superloop. By the end of this article, you'll be able to: - Measure or calculate the deadlines, periods, and worst-case execution times for each task in your system, - Determine, using either a response-time analysis or a utilization test, if that set of tasks is schedulable using either a superloop or an RTOS, and - Assign RTOS task priorities optimally.
Introduction to Microcontrollers - Beginnings
Welcome to this Introduction to Microcontroller Programming tutorial series. If you are looking to learn the basics of embedded programming for microcontrollers (and a bit of embedded hardware design as well), I hope these tutorials will help you...
I Stopped Testing Embedded Systems by Hand. Here's What Replaced It.
Everardo Garcia walks through the shift from manual, terminal-based system-level testing to automated tests that run during development. He shows how OpenHTF (a framework originally built at Google for manufacturing lines) plus a laptop, a USB cable, and ~150 lines of Python closes the functional testing gap most embedded teams carry, and how spec-driven prompting with GitHub Copilot makes writing plugs and phases fast enough to keep up.







