Firmware-Specific Bug #9: Incorrect Priority Assignment

Get your priorities straight! Or suffer the consequence of missed deadlines. Of course, I’m talking here about the relative priorities of your real-time tasks and interrupt service routines. In my travels around the embedded design community, I’ve learned that most real-time systems are designed with ad hoc priorities. Unfortunately, mis-prioritized systems often “appear” to work […]

Read More

Probability, Stochastic Processes, and Airport Security

I’m an engineer.  This means, like most engineers, I survived a couple of courses on probability.  For some engineers this knowledge is critical to their work.  For many it merely provides background knowledge about the behavior of the physical world.  As a group, however, engineers have a much better understanding of probabilistic events than the […]

Read More

Firmware-Specific Bug #8: Priority Inversion

A wide range of nasty things can go wrong when two or more tasks coordinate their work through, or otherwise share, a singleton resource such as a global data area, heap object, or peripheral’s register set. In the first part of this column, I described two of the most common problems in task-sharing scenarios: race […]

Read More

Firmware-Specific Bug #7: Deadlock

A deadlock is a circular dependency between two or more tasks. For example, if Task 1 has already acquired A and is blocked waiting for B while Task 2 has previously acquired B and is blocked waiting for A, neither task will awake. Circular dependencies can occur at several levels in the architecture of a […]

Read More

Subscribing to this Blog’s Comments

I recently learned it’s possible to easily subscribe to all the comments posted on this blog. Given the quality of the comments that are posted here, I thought others may be interested too.

Read More

Firmware-Specific Bug #6: Memory Leak

Eventually, systems that leak even small amounts of memory will run out of free space and subsequently fail in nasty ways. Often legitimate memory areas get overwritten and the failure isn’t registered until much later. This happens when, for example, a NULL pointer is returned by a failed call to malloc() and the caller blindly […]

Read More

Linear statechart notation

The traditional fully 2-dimensional structure of UML state diagrams is too much rope to hang yourself with. There is no standard drawing order or pattern; some designers start from the top, some from the middle, and others just “go with the flow”. Transitions can originate at any state edge and go in any direction, so they are […]

Read More

Configuring hardware – part 1.

One of the more challenging tasks in embedded systems programming is configuring the hardware peripherals in a microcontroller. This task is challenging because: Some peripherals are stunningly complex. If you have ever configured the ATM controller on a PowerQUICC processor then you know what I mean! The documentation is often poor. See for example just […]

Read More

Subscribing to comments

I heard from Jeff Gros the other day asking if it’s possible to subscribe to all the comments posted on this blog. Given the quality of the comments that are posted here, I thought it was an excellent request. Anyway, the answer is yes.  Just follow this link.

Read More

What Belongs in a C .h Header File?

What sorts of things should you (or should you not) put in a C language .h header file? When should you create a header file? And why? When I talk to embedded C programmers about hardware interfacing in C or Netrino’s Embedded C Coding Standard, I often come to see that they lack basic skills and information about […]

Read More