I have atmega128 based board, after power on reset I can read the correct device signature (0x1E,0x97,0x02) , but one time only, the next signature read i got allows 0x00,0x01,0x02.
in programming a got this message
Unexpected signature 0x00000102 (expected 0x001e9702).
Unable to enter programming mode. Verify device selection, interface settings, target power, security bit, and connections to the target device.
same result with STK500, USBasp and PICKIT 4