Beyond the RTOS: A Better Way to Design Real-Time Embedded Software

An RTOS (Real-Time Operating System) is the most universally accepted way of designing and implementing embedded software. It is the most sought after component of any system that outgrows the venerable “superloop”. But it is also the design strategy that implies a certain programming paradigm, which leads to particularly brittle designs that often work only […]

Read More

Fast, Deterministic, and Portable Counting Leading Zeros

Counting leading zeros in an integer number is a critical operation in many DSP algorithms, such as normalization of samples in sound or video processing, as well as in real-time schedulers to quickly find the highest-priority task ready-to-run. In most such algorithms, it is important that the count-leading zeros operation be fast and deterministic. For […]

Read More

Are We Shooting Ourselves in the Foot with Stack Overflow?

In the latest Lesson #10 of my Embedded C Programming with ARM Cortex-M Video Course I explain what stack overflow is and I show what can transpire deep inside an embedded microcontroller when the stack pointer register (SP) goes out of bounds. You can watch the YouTube video to see the details, but basically when the stack overflows, memory beyond the stack bound […]

Read More

Cutting Through the Confusion with ARM Cortex-M Interrupt Priorities

The insanely popular ARM Cortex-M processor offers very versatile interrupt priority management, but unfortunately, the multiple priority numbering conventions used in managing the interrupt priorities are often counter-intuitive, inconsistent, and confusing, which can lead to bugs. In this post I attempt to explain the subject and cut through the confusion. The Inverse Relationship Between Priority […]

Read More

Embedded C Programming with ARM Cortex-M Video Course

As part of my New Year’s resolution for 2013, I just started to teach an Embedded C Programming Course with ARM Cortex-M on YouTube. The playlist for this course is available at: . The course is intended for beginners and is structured as a series of short, focused, hands-on lessons that teach you how to program […]

Read More

What’s the state of your Cortex?

Recently, I’ve been involved in a fascinating bug hunt related to a very peculiar behavior of the ARM Cortex-M3 core. Given the incredible popularity of this core, I thought that digging a little deeper into the mysteries of ARM Cortex could be interesting and informative. First, I need to provide some background. So, the bug […]

Read More

Insects of the computer world

The recent Jack Ganssle’s “Breakpoints” blog on Embedded.com makes an excellent point that the same forces (the Moore’s law), which drive down the prices of high-end processors open even more market opportunities at the low-end of the price spectrum. I also agree that the most deciding factor for the price of a single-chip microcontroller (MCU) is the efficiency of […]

Read More