Illogical Logic

There have been times when digital logic doesn’t behave logically. In such cases, you must consider that logic blocks are an abstract model implemented using electrical, substrate physics and even electromagnetic physics processes. This is where you run into hardware errors, even chip errata. Below are a few examples I ran into:

  • “It’s as if when this interrupt occurs, it makes this clock line radiate like an antenna and it gets picked up by this other interrupt pin”. Hardware engineer runs out of the room, checks schematic and discovers that the affected lines were not terminated (left floating). After a patch to the board, worked perfectly.
  • “It’s like these two C code statements don’t exist after the previous statement to change the CPU clock frequency”. SoC chip errata discovered with a new date code batch of chips. Solution was to put five embedded assembler NOPs after changing the clock (and ensure interrupts are disabled).
  • “This thing never turns off! … even when I disconnect the power.” Wiring error putting out of spec voltage on an input port. Enough of this leaked through circuits to keep the MCU running.

And I could come up with more. Takeaway here is that sometimes you have to think outside the logic block boxes.