ESE101: Chip Errata (Hardware Bugs)

I upgraded Code Composer Studio recently (Mac Version: 6.1.3.00034) and ran into a feature I hadn’t noticed before.

I was modifying the GPIO reading code from a couple weeks ago and saw something strange:

What is that exclamation point in a triangle? That doesn’t look good. I hovered over it and CCS explained the warning:

The build output had the same warning message:

"../main.asm", WARNING! at line 35: [W5369] Silicon Errata CPU40: A jump instruction at the end of a section should be followed by a NOP.

“Silicon errata” is a technical way of saying “a bug in the chip hardware.” It turns out that making chips is difficult, and fixing hardware bugs is much harder than just pushing a patch over the internet. Unlike software bugs, chip bugs and any workarounds are usually well documented by their creators: you can find the full list of MSP430 chips bugs here. Here’s what the errata document says about the error we ran into, CPU40:

You don’t have to understand everything it says to see that TI provides a lot of detail about what causes the bug and how to workaround it.

I count 82 chip bugs in that document. That’s pretty typical of most chips I’ve worked with.

TI’s Code Composer Studio IDE is the first development environment that’s warned me about a bug that I was about to run into - good for TI! And they didn't just warn me about a bug, they also told me how to fix it - thanks!

I added a NOP instruction as the IDE suggested and the warning went away.

(The NOP instruction means “No OPeration” - it literally does nothing except takes up space in memory and use a little bit of execution time.)


The cover image is by Windell Oskey of Evil Mad ScientistCC BY 2.0. He shows you how to make your own chip bugs here.