Skip to content

Commit b6d21d1

Browse files
umbynosfacchinm
andcommitted
Try to run ChipErase on UPDI even if return code is -67
Co-authored-by: Martino Facchin <[email protected]>
1 parent a03d0ac commit b6d21d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ int main(int argc, char * argv [])
11181118
rc = avr_signature(pgm, p);
11191119
if (rc != 0) {
11201120
// -68 == -(0x44) == -(RSP3_FAIL_OCD_LOCKED)
1121-
if ((rc == -68) && (p->flags & AVRPART_HAS_UPDI) && (attempt < 1)) {
1121+
if ((rc == -68 || rc == -67) && (p->flags & AVRPART_HAS_UPDI) && (attempt < 1)) {
11221122
attempt++;
11231123
if (pgm->read_sib) {
11241124
// Read SIB and compare FamilyID

0 commit comments

Comments
 (0)