Corrupted my bootloader, it should not happen.

In the past I had to burn the bootloader sometimes to make a bricked Arduino working again. I didn't have to do that for a long time.

But today I corrupted the bootloader. I accidently connected a plug upside-down. It should not blow anything, because there are resistors to limit the current. Only the SCL pin got a negative voltage, but luckely the SCL pin was still okay.

The sketch was still working, but I could not upload anything. The fuses had not changed. After burning the bootloader, everything was okay.

This is not normal. Why did the sketch still work, but the bootloader was the first thing to go ? Why could a negative voltage or perhaps a negative pulse or glitch corrupt the bootloader at all ? Is it cross-talk inside the ATmega chip, or was wrong code executed ?

Does the board have a diode on reset? (Which revision is the board?)

It was a standalone, it is even a old ATmega8L-8PU. No diode on the reset. The DTR was connected to a usb-serial module, but the reverse voltage was only on the I2C. Would a diode prevent that to happen ?

The DTR was connected to a usb-serial moduleā€¦

Using the traditional pullup resistor / capacitor circuit?

Once you exceed the specifications for the chip it is probably entitled to exhibit undefined behaviour.

Bootloader corruption could well be an example of that.

Coding Badly, yes 10k and 100nF, the usual.

Nick Gammon, okay, but why does it have to be bootloader? I think the most common problems (when the chip is still working a little) are blown analog part of the chip and bootloader corruption. Is the bootloader that sensitive ? more sensitive than the rest of the flash ?

That reset circuit can, under some conditions, pulse the reset pin at 10V or higher. Occasionally , this puts some processors into high-voltage programming mode. There are two reported symptoms...

  1. Lockup. The processor stops responding until power is toggled.

  2. Bootloader corruption. The bootloader stops working correctly presumably because the image is corrupt.

If you want more details, there is a long thread in this forum discussing the issue. The solution is to add a diode to the reset circuit; see the Uno R3 reset circuit.

Thanks ! Entering the High Voltage Programming Mode probably due to a charged capacitor somewhere or a capacitor decharging might be the cause. Since only a small current is needed, the resistors in my circuit could not prevent that.

I read this :

And this long thread :

I also use some Arduino Pro Mini boards, they don't have that diode.