Skip to content

Commit 3ded910

Browse files
committed
Try to run ChipErase on UPDI even if return code is -67
Fixes arduino/ArduinoCore-megaavr#33
1 parent 521c079 commit 3ded910

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ int main(int argc, char * argv [])
10461046
rc = avr_signature(pgm, p);
10471047
if (rc != 0) {
10481048
// -68 == -(0x44) == -(RSP3_FAIL_OCD_LOCKED)
1049-
if ((rc == -68) && (p->flags & AVRPART_HAS_UPDI) && (attempt < 1)) {
1049+
if ((rc == -68 || rc == -67) && (p->flags & AVRPART_HAS_UPDI) && (attempt < 1)) {
10501050
attempt++;
10511051
if (pgm->read_sib) {
10521052
// Read SIB and compare FamilyID

0 commit comments

Comments
 (0)