Microcontroller RESET Problem

The Unexpected reset of a microcontroller is the microcontroller reset problem which we are going to discuss in this blog post. Whenever you are dealing with some external peripheral interfacing this could be a big issue if not managed properly and could cost you a loosing your project.

There are many possible reasons including hardware and software problems such as reset pin issuesESD couplingbad solder jointpower rail glitchwatchdog timerdivide-by-zerostack overflow, etc. So, let’s break down them and see how to debug such problem? Also, at end of this post I had provided some external links which could help you to learn more on this topic.

Normal Reset Behaviour

Before discussing the improper reset behavior of a microcontroller let’s discuss what is a normal reset behavior? The normal behavior is when we power up the microcontroller and it starts from first instruction in the Program counter. This could also happen when user force microcontroller to go on reset state by pressing the external reset switch or applying the signal on the reset pin of a microcontroller.

This kind of normal reset could happen usually due to power on reset signal. But could be caused by other factors, like hardware faults managed by software and software force the microcontroller to reset. This could be considered normal because it is handled in your firmware design. Other reasons are watchdog timers, brownouts, or initiated by user.

There is a document from NXP which talks about improper reset handling which could cause problems which says.

A simple function such as resetting an MCU during the application or
removal of power can cause many problems if not handled properly.
Symptoms of an improperly handled reset during power transitions can
range from a slight delay in MCU response after power-up to very erratic,
inconsistent behavior to total system failure

AN1744.pdf (nxp.com)

Microcontroller Reset Problem Reasons

As we discussed above, if the microcontroller does not reset as expected this is a big issue which could cause the system failure. We should take detail care of this to ensure a proper system behavior. Here is a tabular representation of the reasons of microcontroller reset problem which could be caused by software or hardware.

Software IssuesHardware Issues
Incorrect Firmware LogicInsufficient Current Capacity
Infinite LoopsDecoupling Capacitors Placement/Value
Stack OverflowsVoltage Transients
Incorrect InitializationElectromagnetic Interference (EMI)
Race ConditionsGrounding Issues
Bugs in Interrupt Service RoutinesPower Supply Stability
Improper Peripheral ConfigurationHeat-Related Issues
Resource ConflictsFirmware Bugs
External Interference
Software & Hardware reasons for microcontroller reset.

EMI (Electro Magnetic Inference)

Sometimes it happens that some external noise is affecting our microcontroller circuit. This source could be due to EMI or Electromagnetic Inference. The electromagnetic inference is the electrical signal which can disturb the other electric circuit via electromagnetic induction, electrostatic coupling or conduction.

Electromagnetic interference (EMI) is a disturbance generated by an external source that affects an electrical circuit by electromagnetic induction, electrostatic coupling, or conduction 1. EMI can cause a range of problems, from an increase in error rate to a total loss of data 1. The noise can be generated by both human-made and natural sources such as ignition systems, cellular networks of mobile phones, lightning, solar flares, and auroras 1. EMI can affect AM radios, mobile phones, FM radios, televisions, and observations for radio astronomy and atmospheric science 1.

Wikipedia (summarized by bing chat)

To reduce EMI noise, it is important to identify the source of the noise and take appropriate measures. Some common methods include:

  • Shielding: This involves enclosing the affected circuit in a conductive material to block the electromagnetic waves that cause EMI 2.
  • Grounding: This involves connecting the affected circuit to a ground plane to reduce the voltage difference between the circuit and its surroundings 2.
  • Filtering: This involves using filters such as capacitors and inductors to remove unwanted frequencies from the signal 3.

It is important to note that EMI can be intentional as well. For example, it can be used for radio jamming in electronic warfare 1.

Further Readings

  1. https://en.wikipedia.org/wiki/Electromagnetic_interference
  2. https://resources.pcb.cadence.com/blog/2022-the-basics-of-emi-and-rfi
  3. https://www.electrical4u.com/electromagnetic-interference/
  1. Microcontroller reset reason | Forum for Electronics (edaboard.com)
  2. Load on Power Relay Causing Microcontroller Reset | Electronics Forums (maker.pro)
  3. Microcontroller reset problem | Power Integrations, Inc.
  4. microcontroller – What could cause unexplained brownout resets? – Electrical Engineering Stack Exchange
  5. microprocessor – What could cause a microcontroller to unexpectedly reset? – Electrical Engineering Stack Exchange
  6. RESET (microchip.com)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.