What causes a reset
A processor resets when its supervisory circuit detects an abnormal condition, or when the firmware hangs and the supervision timer, known as the watchdog, resets it. The first step is therefore to find out what type of reset occurred. Many microcontrollers keep a register with the cause of the last reset: power-on, low voltage, watchdog or software reset.
Frequent causes
- Momentary supply dips: the voltage falls below the supervisor threshold during current peaks, for example when a relay, a motor or a radio module is activated. An insufficient or degraded decoupling capacitor, or a trace with too much impedance, aggravates the problem.
- Noise and transients: electrostatic discharge, switching of inductive loads or poor ground connections can trigger the reset or corrupt the processor state.
- Watchdog: the firmware does not service it in time because of a hung loop, a wait that never ends, or an interrupt that saturates the processor.
- Temperature: components that fail when hot, or a regulator that enters thermal protection.
- Intermittent solder joints or connectors: they lose contact with vibration or flexing, and the reset signal is activated.
- Floating or noisy reset line: a missing bias resistor or missing filtering on the pin.
How to capture the event
- Read the reset cause register if there is one.
- With an oscilloscope, measure the processor supply voltage with a trigger on the dip, and the reset line at the same time. If the voltage falls before the reset, the origin is electrical.
- If the supply is clean, observe whether the reset coincides with an action of the board, such as activating an output or transmitting.
- Vary the temperature and apply gentle pressure to the board to provoke the intermittent fault.
How to interpret the result
A visible supply dip points to the power supply, the decoupling or the wiring. A reset with a clean supply and a watchdog cause points to the firmware. A reset that repeats when a specific point is touched points to a bad joint. An oscilloscope probe with a long ground lead can show noise that does not really exist, so it is advisable to use a short reference point.