Short answer
If voltage drops during a write, the process can stop partway and corrupt the software. A fully charged battery and a stable power supply are therefore recommended.
Detailed answer
During programming, the unit and other systems in the car keep drawing power. On some cars the cooling fans can also start up during a write and pull the voltage down, and an ordinary charger can introduce fluctuation of its own.
Suitable values and acceptable ranges vary by vehicle and tool, so go by the figures in your tool's manual and measure the voltage before starting.
Throughout the process, leave the ignition, doors and lights as stable as you can, and switch off loads such as the audio system and air conditioning. Do not touch the connections until the tool reports that it has finished.
Last updated: