I have a board where I have some electrolytic capacitors on the input side of a voltage regulator. Under normal operation everything is ok. But the board can also during programming of the MCU be fed from the outputside of the regulator. This would leave the cathode (-) of the electrolytes (that might hold charge from previous operation) connected to ground and the anode (+) would be floating.
Please see the following conceptual circuit (not actual circuit!):
During normal operation V1 is connected and supplying 12V and charging C1. During programming, V1 is disconnected and V2 is connected. The ground level may have shifted and C1 could possibly contain charge.
Do I risk damaging C1 when connecting V2 as the other terminal is floating and one is grounded to a new ground level?
Should I add a diode from
IN to make the positive terminal of C1 not float when the device is being programmed?