
Symptoms
The microcontroller power supply is off, but the microcontroller continues to operate
Power through I/O is caused by parasitic power flowing through an ESD diode. When the power supply shut down, the ESD diodes on the I/O can be forward biased to sink current from the I/O into the power rail. A similar but briefer phenomenon can be observed if a large, charged capacitor is connected to an I/O line when the device. loses power. The figure below shows the current flow through a simplified model
Figure 1. Power from the I/O

This condition may cause permanent damage to the microcontroller. If other system elements remain powered while the microcontroller is powered off, use a high-impedance logic buffer or level shifter to disconnect the digital signals from reaching the microcontroller’s I/O. In the case of the charged capacitor, a resistor can be added in series with it to limit the current through the diodes