Immunity aware programming is a set of programming techniques used while writing firmware for an embedded system. It is used mainly to overcome random errors that can occur in the CPU program counter or register set, RAM or any other that can cause failure of the "victim" device. Such random errors may be caused by single event upsets, not enough power, or by strong electromagnetic signals transmitted by some other "source" device.