I’m using an ICP2(G3) to do a single word write/read to the EEPROM of an ATTiny817 at address 0x1413 and I’m having issues
Answer
Reprogramming 1 byte is not possible due to page of 32 bytes, I recommend to reprogram entire EEPROM as shown below:
Step 1: Read entire EEPROM (0x1400…0x147F): IcpDoAction(ACT_READ, DM_SPACE, 0, 0, 0, 0, “tmp.hex”); //it reads to “tmp.hex” and PC buffer
Step 2: Modify address 0x1413 (offset 0x13): IcpBufWr(DM_SPACE, 0x13,
Step 3: Disable bulk erase: IcpSetChipEraseBeforeProg(0);
Step 4: Program EEPROM back: IcpDoAction(ACT_PROG, DM_SPACE, 0, 0, 0, 0, “”);Step 5: Restore bulk erase: IcpSetChipEraseBeforeProg(1);