What is “real time”?
The post clarifies the technical meaning of “real time” for embedded systems and contrasts it with the colloquial sense of immediacy. It presents a precise definition: a real-time system’s correctness depends on both logical results and the time at which those results are produced, so missing timing constraints constitutes failure. The article emphasizes determinism — low variance in operation timing — as the key property of real-time systems, and contrasts classic RTOS behavior with general-purpose Linux’s higher timing variance. It also notes that raw CPU overprovisioning can mask nondeterminism in some designs, but is not always practical, reinforcing that real time means predictable timing sufficient for the application, not simply “fast.”
Simulating Your Embedded Project on Your Computer (Part 2)
Having a simulation of your embedded project is like having a superpower that improves the quality and pace of your development ten times over! To be useful, though, it can't take longer to develop the simulation than it takes to develop the application code and for many simulation techniques "the juice isn't worth the squeeze"! In the last article, I showed you how to use the terminal (i.e. printf/getchar) to easily make a completely functional simulation. In this article, we'll take simulation to the next level, either in terms of realism (by using virtual hardware) or in terms of user experience (by using a GUI to simulate our hardware, instead of using the terminal).
Blocking == Technical Debt
Blocking code in embedded systems trades quick development for long-term pain, effectively becoming technical debt. This post shows how blocking in Arduino examples and traditional RTOS threads hard-codes sequences and timing, making change and extension expensive. It contrasts blocking kernels with preemptive non-blocking approaches and recommends event-driven Active Objects and frameworks like QP as more scalable alternatives.
In TCL FPGA Wizards Trust
In TCL FPGA wizards trust. The best way to learn TCL is exposure therapy which we will be doing here using two examples: One for creation of a project with synthesis and implementation steps and another for simulation.
How 5G impacts future IoT development
The Internet of Things (IoT) applications are ubiquitous today. IoT is used in almost every industrial, commercial, and consumer market segment, including autonomous driving, smart factories, automation and preventive maintenance, smart homes, smart cities, security, asset tracking, supply chain management, agriculture, farming, healthcare, smart medicine and remote surgery, augmented reality applications, activity monitoring, and more. The three most promising uses of IoT are smart manufacturing, autonomous driving, and healthcare, particularly remote surgery.
Product quality: belief or proof?
Embedded software development is a challenging activity, so it is essential to have tools and IP that is of the best quality. However, assessing that quality can be, in itself, a challenge.
Picowoose: The Raspberry Pi Pico-W meets Mongoose
This example application describes the way to adapt the George Robotics CYW43 driver, present in the Pico-SDK, to work with Cesanta's Mongoose. We are then able to use Mongoose internal TCP/IP stack (with TLS 1.3), instead of lwIP (and MbedTLS).
Simulating Your Embedded Project on Your Computer (Part 1)
Having a simulation of your embedded project is like having a superpower that improves the quality and pace of your development ten times over! To be useful, though, it can't take longer to develop the simulation than it takes to develop the application code and for many simulation techniques "the juice isn't worth the squeeze"! In this two-part blog series, I'll share with you the arguments in favor of simulation (so, hopefully, you too believe in its value) and I'll show you what works (and what doesn't work) to help you to simply, easily, and quickly simulate your embedded project on your computer.
How to use analog input (ADC) on NuttX RTOS
Hands-on walkthrough showing how to read analog voltages on a Raspberry Pi Pico running NuttX RTOS. The post explains RP2040 ADC basics, which GPIO channels and the internal temperature sensor are exposed, and how rp2040_adc_setup creates /dev/adc0. It also shows the menuconfig options, build and UF2 flash steps, a simple potentiometer test, and a note about RP2040 ADC spike artifacts.
Understanding Yocto Project Layers: A Modular Approach to Embedded Systems Development
Managing metadata across embedded Linux builds gets messy fast, so the Yocto Project uses layers to keep things modular and reusable. This post walks through inspecting active layers with bitbake-layers, controlling overrides with BBFILE_PRIORITY, and creating a meta-yocto-splash-img layer that uses a .bbappend to replace psplash. It finishes by showing how to verify the custom splash screen in QEMU so you can test safely before deploying to hardware.
C++ Assertion? Well Yes, But Actually No.
Assertions are a double-edged sword - on one side you enforce program correctness catching bugs close to their origin, on the other your application is subject to run-time error, like any interpreted language. This article explores what C++ can offer to get the advantages of assertions, without risking the crashes by moving contract checking at compile time.
Getting Started With Zephyr: Saving Data To Files
In this blog post, I show how to implement a Zephyr application to mount a microSD card, create a new file on the microSD card, and write data to it. The lessons learned from such an application can be helpful for devices out in the field that need to write data to off-board memory periodically, especially in cases where Internet access may be sporadic.
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 allows developers to easily customize their development environment which can help them accelerate development, minimize bugs, and make developing software overall much better.
One challenge with Visual Studio Code is that embedded software...
Modern C++ in Embedded Development: (Don't Fear) The ++
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.
Introduction to Microcontrollers - Interrupts
Interrupts are not magic, they are the practical tool that lets a microcontroller respond in microseconds while still doing background work. This introduction explains what an interrupt and an ISR are, how return addresses and CPU state are saved, and why ISRs must be short and carefully written. AVR and STM32 external-interrupt examples show real configuration steps and key gotchas to watch for.
Important Programming Concepts (Even on Embedded Systems) Part I: Idempotence
Idempotence is a simple design principle that prevents duplicate effects when operations are retried or repeated. Jason Sachs shows why it matters in embedded systems, from HTTP submit buttons and capacitive touch inputs to garage-door remotes and SPI DAC writes. Read this post to learn three practical idempotent techniques and when redundant writes are a sensible reliability trade-off.
VHDL tutorial
Gene Breniman presents a hands-on VHDL walkthrough for a programmable clock divider implemented on a Xilinx CoolRunner CPLD (XC2C32A). The example shows how to declare ports and internal signals, implement a clock-division process with reset and falling-edge detection, and create a simple addressable latch to select clock rates from a 40MHz master clock. It’s a compact, practical guide for embedded engineers learning VHDL and CPLD design.
Finite State Machines (FSM) in Embedded Systems (Part 4) - Let 'em talk
No state machine is an island. State machines do not exist in a vacuum, they need to "talk" to their environment and each other to share information and provide synchronization to perform the system functions. In this conclusive article, you will find what kind of problems and which critical areas you need to pay attention to when designing a concurrent system. Although the focus is on state machines, the consideration applies to every system that involves more than one execution thread.
Finite State Machines (FSM) in Embedded Systems (Part 2) - Simple C++ State Machine Engine
When implementing state machines in your project it is an advantage to rely on a tried and tested state machine engine. This component is reused for every kind of application and helps the developer focus on the domain part of the software. In this article, the design process that turns a custom C++ code into a finite-state machine engine is fully described with motivations and tradeoffs for each iteration.
VHDL tutorial - A practical example - part 2 - VHDL coding
Gene Breniman walks through the VHDL coding for a CPLD-based data acquisition engine, turning the hardware spec into a working state machine and signal generators. The article explains SPI and I2S timing choices, an internal SPI peripheral latch, and counter-based timing (seqCount and CycleCnt) used to create LRCK, BCK, SPI SCK and nvSRAM write control. It’s a practical, implementation-focused guide for embedded designers.
Digital PLL's -- Part 1
A hands-on introduction to time-domain digital phase-locked loops, Neil Robertson builds a simple DPLL model in MATLAB and walks through the NCO, phase detector, and PI loop filter implementations. The post uses phase-in-cycles arithmetic to show how the phase accumulator, detector wrapping, and loop filter interact, and it contrasts linear steady-state behavior with the nonlinear acquisition seen when initial frequency error is large. Part 2 will cover frequency-domain tuning of the loop gains.
Byte and Switch (Part 1)
Driving a 24V electromagnet from a 3.3V microcontroller looks trivial, but Jason Sachs shows how that simple switch can fail spectacularly. He walks through the cause of MOSFET destruction when an inductive load is turned off, and explains the practical fixes you actually need: a flyback diode, a gate series resistor, and a gate pulldown to keep the transistor well behaved.
Endianness and Serial Communication
A single wrong byte order can cost you a day of debugging, and Stephen Friederichs walks through how to avoid that when sending multi-byte data over a byte-oriented serial link. He demonstrates an ATmega328P sending 16-bit ADC readings, capturing raw bytes with RealTerm, and plotting with Octave, showing how swapped endianness can produce plausible but incorrect results. The post gives practical steps to capture, test, and verify byte order.
How to Build a Fixed-Point PI Controller That Just Works: Part I
Jason Sachs digs into the implementation choices that make a fixed-point PI controller reliable in real embedded systems. He focuses on practical fixes rather than tuning: prefer scale-then-integrate, fold the timestep into the integral gain, and apply anti-windup so saturations and sensor noise do not break the loop. Part I covers discrete-time pitfalls and sets up fixed-point scaling issues for Part II.
Introduction to Microcontrollers - Timers
Time is everything in embedded systems, and Mike Silva walks through how microcontroller timers turn clock pulses into dependable events. He covers prescalers, counter bit widths, overflow versus compare modes, atomic multi-byte register access, the "-1 rule", input capture and compare leapfrogging, with concrete AVR and STM32 code that highlights common pitfalls and reliable patterns for precise ticks.
Important Programming Concepts (Even on Embedded Systems) Part V: State Machines
State machines are not glamorous, but they solve a lot of real embedded problems. Jason Sachs uses a motorized couch example to show how FSMs and Harel statecharts expose corner cases, simplify timing constraints, and make behavior easier to specify and review. The article walks through hand-rolled switches, tabular implementations, the state pattern, libraries like QP and Boost, and tool tradeoffs.
An overview of Linux Boot Process for Embedded Systems
Booting Linux on embedded hardware collapses PC boot stages into a single bootloader, and understanding the early steps helps troubleshoot low-level failures. Kunal Singh breaks down the sequence from the bootstrap firmware and primary/secondary bootloaders through zImage decompression, MMU and page table setup, start_kernel, and the initrd pivot to the root filesystem. Practical focus favors ARM examples.
10 Circuit Components You Should Know
Jason Sachs pulls together ten underrated but highly practical circuit components that every embedded engineer should know. From multifunction logic gates that act like a Swiss Army knife for glue logic to TL431 shunt regulators and tiny charge-pump inverters, each item is presented with real-world use cases and caveats. Read this to expand your parts toolbox and simplify future designs.
Boot sequence for an ARM based embedded system -2
DM walks through the concrete steps of an ARM system startup, from the reset vector to handing control to C. The post explains what the early assembly reset code must do: set system registers, initialize stacks, set up the MMU, copy .data and clear .bss, and remap the vector table into RAM for faster interrupts. It finishes with external memory bring-up and loading an OS image.
Ten Little Algorithms, Part 3: Welford's Method (and Friends)
Jason Sachs takes a practical look at Welford's method, a numerically stable online algorithm for computing mean and sample variance without storing large batches. He demonstrates Python implementations, shows why the naive sum and sum-of-squares approach suffers catastrophic cancellation, and why Welford is a better fit for memory- and CPU-constrained embedded systems. Jason then turns Welford into simple filters for tracking time-varying noise and discusses heuristic fixes and tradeoffs.
Back from ESC Boston
Stephane nearly skipped ESC Boston, but going turned into a productive mix of networking, informal meetups, and on-the-floor filming. He captures candid encounters with speakers and vendors, learns how small shows differ from larger expos, and outlines practical follow-ups like booth highlight videos and speaker hospitality suggestions. The post is an encouraging read for engineers weighing the value of regional conferences and DIY event coverage.
Launch of Youtube Channel: My First Videos - Embedded World 2017
Stephane Boucher turned his Embedded World 2017 trip into a debut YouTube series of short booth highlight videos. He walks through the steep learning curve of trade-show filming, the specific gear he bought and rented to cope with low light and noise, and the practical mistakes he plans to fix. The post lists filmed vendors and asks readers for feedback to improve future episodes.
Who else is going to Embedded World 2017 in Nuremberg?
These days I am particularly excited. In a little bit less than a month and a half, I will be travelling to Nuremberg in Germany to attend Embedded World, by far the biggest Embedded Systems trade show with over 1000 vendors displaying their products and services.
I have downloaded the Duolingo app and I'm trying to do a minimum of 30 minutes per day to learn some German. So far, I know that 'Frau' is a woman, 'Mann' is a man, 'Danke' is thank you and 'tschüss' is bye - still a...
New Comments System (please help me test it)
DSPRelated just got a practical upgrade, Stephane Boucher has released a new comments system built from his earlier forum work. It supports drag-and-drop or Insert Image uploads, MathML, TeX and ASCIImath rendered by MathJax, syntax-highlighted code via highlight.js, and in-place editing and deletion of comments. Improved email notifications alert authors and commenters to replies, and readers are invited to post test comments and report problems.
3 Good News
Stephane Boucher reports three quick wins for the EmbeddedRelated community: two sponsors have seeded a $1,000 rewards pool, the site now serves all pages over HTTPS, and the new forums have their first active discussions. If you want a share of the sponsor-funded rewards, jump into the forums and check the Vendors Directory for opportunities. Stay tuned for more updates.
The New Forum is LIVE!
After months of hard word, I am very excited to introduce to you the new forum interface.
Here are the key features:
1- Easily add images to a post by drag & dropping the images in the editor
2- Easily attach files to a post by drag & dropping the files in the editor
3- Add latex equations to a post and they will be rendered with Mathjax (tutorial)
4- Add a code snippet and surround the code with
Helping New Bloggers to Break the Ice: A New Ipad Pro for the Author with the Best Article!
Breaking the ice can be tough. Over the years, many individuals have asked to be given access to the blogging interface only to never post an article.
Welcoming MANY New Bloggers!
A big influx of new voices just joined DSPRelated, and Stephane Boucher introduces the growing roster of contributors and their backgrounds. The post lists dozens of newly approved bloggers, highlights the range of DSP and embedded expertise they bring, and asks readers to leave constructive feedback on posts. It also explains why some applicants may not have been accepted yet and how to apply properly.
Recruiting New Bloggers!
Previous calls for bloggers have been very successful in recruiting some great communicators - Rick Lyons, Jason Sachs, Victor Yurkovsky, Mike Silva, Markus Nentwig, Gene Breniman, Stephen Friederichs,
DSPRelated and EmbeddedRelated now on Facebook & I will be at EE Live!
Stephane Boucher announces two practical updates for DSPRelated readers. He launched Facebook pages for DSPRelated and EmbeddedRelated so members can get faster updates, and he will be attending EE Live in San Jose from March 30 to April 3 with a $100-off promo code for early registration. He also asks the community for ideas on how to make his conference coverage most useful.

























