Potential causes of Atmel "system" failure after reflash with same binary
I would guess that you damaged something on your "cartridge" when you attached the test clip. It sounds like you were connecting a powered Raspberry Pi in parallel with the ATmega16 and possibly other devices on your cartridge. This kind of thing must be done carefully to isolate the flash from the rest of the circuit during programming.