I have set the lock fuse on an Attiny1606 for the first time; now I'm unable to unlock the chip again with a complete chip erase. From the older chips, e.g. Atmega328, I know the behaviour was that by simple re-flashing a locked chip the lock was removed too, but with the new ones I have learned that unlocking the chip is a bit more difficult task, looking at the datasheet.
I'm working with Visual Studio Code / Platform.IO as IDE and with a JTAG2UPDI programmer which works fine for the usual tasks, but I failed finding a way to do a complete chip erase. The datasheet says:
"1. Enter the Chip Erase key by using the KEY instruction. See Table 30-5 for the CHIPERASE signature.
2. Optional: Read the Chip Erase (CHIPERASE) bit in the ASI Key Status (UPDI.ASI_KEY_STATUS) register to see that the key is successfully activated.
3. Write the signature to the Reset Request (RSTREQ) bit in the ASI Reset Request (UPDI.ASI_RESET_REQ) register. This will issue a System Reset.
4. Write 0x00 to the ASI Reset Request (UPDI.ASI_RESET_REQ) register to clear the System Reset.
5. Read the NVM Lock Status (LOCKSTATUS) bit from the ASI System Status (UPDI.ASI_SYS_STATUS) register.
6. The chip erase is done when LOCKSTATUS bit is ‘0’. If the LOCKSTATUS bit is ‘1’, return to step 5."
I have no clue how to this, neither from the IDE nor with avrdude CLI commands; can somebody point me in the right direction?
Thanks a lot!