Designing Communication Protocols, Practical Aspects
When your MCU must talk to a PC or smartphone, a clear protocol saves time and headaches. This post gives practical guidance for fast bring-up: how to structure a compact header, keep payloads byte-aligned and debug-friendly, and reserve bits for future use. It also covers CRCs for integrity, timeout and retry strategies for resynchronisation, and the simple start code trick that makes debugging easier.
A brief overview of flight control software
It has been a long time since the first drones appeared. If you are interested in such a topic, you may be confused about how and where to jump in. Since I went through the same phase, I'd like to write my findings here and help others.
For this blog post, I've created chart and table with all open source flight control programs I've been able to find.
The chart shows the course of development of the existing software. It is separated in years and you can see when which project...
Debugging DSP code.
Strange sinusoidal confidence scores from an HTM neural model revealed a familiar class of DSP bugs. Drawing from forum troubleshooting, the post maps common root causes: signed versus absolute value errors, wrong intermediate references, scaling mistakes, and sampling/stride problems in integer math. Embedded engineers will recognize the diagnostic clues and practical suspects to check first when DSP outputs vary with the input.
Mutex vs. Semaphore - Part 1
Most forum answers get the semaphore versus mutex debate wrong. This post traces semaphores back to Dijkstra and Scholten, explains the difference between binary and counting semaphores, and highlights runtime hazards such as accidental release, recursive and task-death deadlocks, priority inversion, and misuse as signals. Read if you want to avoid common concurrency pitfalls in RTOS code.
Patents and the little guy working at home
There are pluses and minuses to having patents. As it stands now the patent system is horribly broken and not doing what the founders intended when they set it up.I have some patents through work and it does look nice to see my name on the patent database. It's kinda like wetting yourself in a dark suit - it gives you a warm feeling but nobody notices.Don Lancaster makes a compelling argument that for the little guy it’s best to avoid the whole mess to the degree possible.Public speaking
Presenting technical work is unavoidable for embedded engineers, but few get formal training on how to do it well. This post gives practical, low-overhead tactics: use a single person focus to steady nerves, build a bullet point memory palace to guide remarks, time your talk with about 100 words per minute, avoid reading slides, and rehearse on camera. These tips make talks clearer and less stressful.
Getting smacked by the long tail of poor design habits
In the 80’s I did a fair amount of consulting and enjoyed it greatly.
I would come in, hear what it was the person hiring me wanted; meet with the people that I needed to work with and proceed to toss together a design, parts list, and program. Sometimes I would work with them to get a board into production. I knew my chips and code and could make all kinds of amazing toys.
One of my biggest repeat customers eventually offered a good salary at the same time that my wife was feeling...
Free Goodies from Embedded World - Full Inventory and Upcoming Draw Live-Streaming Date
Stephane came back from Embedded World with a massive haul of development kits, tools and swag and decided to give it away to multiple winners. Read the full inventory, learn how to enter by liking or sharing the LinkedIn and Twitter posts, and tune in Friday March 29 at 1pm EST on EmbeddedRelated.tv for the live draw where winners will pick their prizes.
AI at the Edge - Can I run a neural network in a resource-constrained device?
AI at the edge is no longer science fiction, it can run on tiny, resource-constrained devices like Arm Cortex-M4 and M7 microcontrollers. This post introduces inference-only neural networks on MCUs, explains why edge AI matters for power, latency, and privacy, and points to practical toolchains such as STM32Cube.AI, Arm NN, and AWS Greengrass to get started quickly.
Free Goodies from Embedded World - What to Do Next?
Stephane Boucher went on a hunt for free stuff at Embedded World to assemble a giveaway bundle for a lucky reader. This short update shares that haul and asks the embedded community for ideas on what to do next. It is a conversational call for suggestions, aiming to turn conference swag into a useful prize.
Getting Started With Zephyr: Writing Data to EEPROM
In this blog post, I show how to implement a Zephyr application to interact with EEPROM. I show how the Zephyr device driver model allows application writers to be free of the underlying implementation details. Unfortunately, the application didn't work as expected, and I'm still troubleshooting the cause.
Donald Knuth Is the Root of All Premature Optimization
Knuth's famous line "premature optimization is the root of all evil" has turned into a blunt rule on forums, Jason Sachs argues, and that overuse masks important nuance. He walks through concrete embedded examples, from dsPIC33E floating-point timings to an ROI analysis in the Kittens Game and a continuous optimization toy problem, to show when to measure, when to speculate, and why profilers can mislead.
Wye Delta Tee Pi: Observations on Three-Terminal Networks
Three-terminal passive networks, wye, delta, tee, and pi, are more interchangeable than many engineers expect. Jason Sachs walks through Kennelly's wye-delta formulas, Z and Y matrix representations for tee and pi two-port networks, and worked examples ranging from balanced to highly skewed impedances. The post highlights practical payoffs, including using topology transforms to substitute hard-to-source capacitors with simpler, precision-friendly parts.
Video-Based STEM Embedded Systems Curriculum, Part 1
This curriculum shows how to teach introductory embedded systems using free online videos and low-cost kits, suitable for middle-school, high-school, college, or adult learners. It packages curated educator recommendations, a per-student equipment and book list, essential free software, and core lesson topics like Arduino, MicroPython, Kicad board design, soldering, and RTOS basics. The approach stresses hands-on labs, safety, backups, mentorship, and adapting to local budgets.
STM32 B-CAMS-OMV Walkthrough
Want to prototype embedded vision quickly? This walkthrough shows how the STM32 B-CAMS-OMV camera module pairs with the STM32H747I-DISCO discovery kit and the FP-AI-VISION1 function pack to get you running in minutes. The video covers the camera connection interface, key software functions to control and process data, and the ISP features that let image processing run inside the camera. The STM32 H7 project with B-CAMS-OMV drivers is available on GitHub.
NULL pointer protection with ARM Cortex-M MPU
This post explains how you can set up the ARM Cortex-M MPU (Memory Protection Unit) to protect thy code from dragons, demons, core dumps, and numberless other foul creatures awaiting thee after thou dereference the NULL pointer.
Modern Embedded Systems Programming: Beyond the RTOS
Blocking-based RTOS tasks make embedded systems brittle and hard to extend, this post argues, and presents a practical alternative: active objects organized as message pumps. It explains why one-blocking-call tasks and nonblocking event handlers improve responsiveness and reduce task proliferation, and recommends using frameworks plus hierarchical state machines and UML to enforce good architecture and make designs scalable.
The Inaugural Embedded Systems Summit is Coming to Silicon Valley!
Stephane Boucher and Jacob Beningo are launching the first Embedded Systems Summit, an in-person, engineer-run conference in Silicon Valley from October 14 to 16, 2025. Expect practical, hands-on sessions and familiar speakers from the Embedded Online Conference. Passes are limited, so read on to learn why this event could be a high-impact investment in your embedded engineering career.
Who else is going to Sensors Expo in San Jose? Looking for roommate(s)!
This will be my first time attending this show and I must say that I am excited. I am bringing with me my cameras and other video equipment with the intention to capture as much footage as possible and produce a (hopefully) fun to watch 'highlights' video. I will also try to film as many demos as possible and share them with you.
I enjoy going to shows like this one as it gives me the opportunity to get out of my home-office (from where I manage and run the *Related sites) and actually...
Specifying the Maximum Amplifier Noise When Driving an ADC
You can quantify how much amplifier noise is acceptable before adding gain actually hurts an ADC's output SNR. Rick Lyons presents a compact rule showing the amplifier input-referred noise power must be less than (1 - 1/α^2) times the ADC's q^2/12 quantization noise power, with Eq. (8) and a pair of figures that make it easy to pick or specify the right amplifier for a given gain α.
March is Oscilloscope Month — and at Tim Scale!
Jason Sachs just upgraded his lab with an Agilent MSOX3034A after snagging a vendor promotion, and he walks through first-day wins from probe compensation to scripting. He shows why 10x probes need capacitive matching and how to use the scope's calibration square wave to compensate them. He also covers connecting the MSOX3000 to Python via pyvisa and SCPI, including decoding waveform data for export.
Learning A New Microcontroller
Learning a new microcontroller becomes manageable with a repeatable, stepwise process that focuses on common peripherals, tools, and example programs. This post lays out hands-on exercises from blinky and UART echoes through I2C/SPI, PWM and ADC to DMA and RTOS variations, and shows how to evolve prototype code into reusable HAL and OSAL layers. Practical tips cover hardware setup, logic analyzers, and keeping an engineering notebook.
Trust, but Verify: Examining the Output of an Embedded Compiler
Jason Sachs argues embedded engineers should read their compiler's assembly even if they rarely write assembly. He walks through Microchip XC16 output for dsPIC33 devices, showing how simple C variants and optimization flags produce very different code. The article demonstrates practical verification techniques and a tiny Python helper, pyxc16, to quickly inspect assembly for timing-sensitive firmware without rewriting everything in assembly.
Ada 2012 for ARM M3/M4 Released for Download
AdaCore's initial Ada 2012 port for ARM Cortex M3/M4 is now downloadable, and Mike Silva walks it through a hands-on demo on an STM32F4 Discovery board. He shows an Ada-written LCD driver, LED multitasking, and how Ada language features like Ada.Realtime, array slices, and unchecked conversions make low-level GPIO and timing code clearer and safer. The post highlights atomic BSRR GPIO writes and Ravenscar runtime details.
Going back to Germany!
A couple of blog posts ago, I wrote that the decision to go to ESC Boston ended up being a great one for many different reasons. I came back from the conference energized and really happy that I went.
These feelings were amplified a few days after my return when I received an email from Rolf Segger, the founder of SEGGER Microcontroller (check out their very new website), asking if I would be interested in visiting their headquarters...
Are We Shooting Ourselves in the Foot with Stack Overflow?
Most traditional, beaten-path memory layouts allocate the stack space above the data sections in RAM, even though the stack grows “down” (towards the lower memory addresses) in most embedded processors. This arrangement puts your program data in the path of destruction of a stack overflow. In other words, you violate the first Gun Safety Rule (ALWAYS keep the gun pointed in a safe direction!) and you end up shooting yourself in the foot. This article shows how to locate the stack at the BEGINNING of RAM and thus point it in the "safe" direction.
Specifying the Maximum Amplifier Noise When Driving an ADC
You can quantify how much amplifier noise is acceptable before adding gain actually hurts an ADC's output SNR. Rick Lyons presents a compact rule showing the amplifier input-referred noise power must be less than (1 - 1/α^2) times the ADC's q^2/12 quantization noise power, with Eq. (8) and a pair of figures that make it easy to pick or specify the right amplifier for a given gain α.
You Don't Need an RTOS (Part 2)
In this second article, we'll tweak the simple superloop in three critical ways that will improve it's worst-case response time (WCRT) to be nearly as good as a preemptive RTOS ("real-time operating system"). We'll do this by adding task priorities, interrupts, and finite state machines. Additionally, we'll discuss how to incorporate a sleep mode when there's no work to be done and I'll also share with you a different variation on the superloop that can help schedule even the toughest of task sets.
Linear Feedback Shift Registers for the Uninitiated, Part XI: Pseudorandom Number Generation
Jason Sachs breaks down when linear feedback shift registers make good pseudorandom sources and when they fail. He shows why LFSR output bits look very different from full-state integer samples, explains their two-valued autocorrelation and quasi-random behavior, and gives practical guidance on when an LFSR is acceptable for fast hardware bit generation and when you should use a proper PRNG instead.
Live Streaming from Embedded World!
Stephane Boucher will bring Embedded World to engineers who cannot attend, streaming high-quality HD video from the show floor. He plans to use a professional camera and a device that bonds three internet links to keep the stream stable, and he is coordinating live sessions with vendors and select talks. Read on to learn how to vote for the presentations you want streamed.




















