I have a pretty interesting problem at hand.
Setup: AS6.2sp1, WIn7-64bit, JTAGICE3 FW version 3.25.
Problem: An attempt to erase ATMega165A via ISP bricks the device.
Symptom: After erase chip returns 0x00FFFFFF as device ID, indicating that the SPI i/f is disabled.
(1) It seems that this problem appeared after running latest Windows update.
As the JTAGICE3 appears as a CMSIS-DAP device, it is highly possible that something got wrong at HID driver level.
(2) The problem does not appear on ATMega325P device (same family), nor ATMega328. Will test later with ATMega165P.
(3) The problem appears on ATMega165A regardless of the design (tested with two completely different boards with minimum number of external components)
(4) All tested 165A chips are from same batch.
(5) Reinstall of AS6.2 did not help.
(6) Sometimes can recover via JTAG, sometimes not, i.e. looks like JTAG gets sometimes disabled as well.
So, assuming that either Windows update broke something or having counterfeit chips (although bought from reliable distributor).
Does anyone have an idea of how to probe further?