#985579 arduino-core-avr: Lock bit values fail verification

#985579#5
Date:
2021-03-20 10:43:45 UTC
From:
To:
Dear Maintainer,

It's not possible to update the fuse/lock bits with the included boards.txt and
recent avrdude versions.

avrdude used to mask unused bits for some microcontrollers, but this was
changed some time ago.

As a result, trying to write fuse bits into an Arduino Uno leads to the
following error:

$ /usr/bin/avrdude -v -patmega328p -cusbtiny -e -Ulock:w:0x3F:m
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0xff != 0x3f
avrdude: verification error; content mismatch

The two uppermost lock bits in the ATmega328P are unused and will always read
as logic 1.

As a result, the following modification must be made to boards.txt:

uno.name=Arduino Uno
...
# original 0x3F
uno.bootloader.unlock_bits=0xFF
# original 0x0F
uno.bootloader.lock_bits=0xCF

This will make avrdude expect a logic 1 and prevent verification failure.

Thank you.

#985579#10
Date:
2021-11-14 12:11:38 UTC
From:
To:
Bug acknowledged. Thank you very much for reporting.
#985579#17
Date:
2021-11-19 17:02:42 UTC
From:
To:
Hi Gregor,

Refer to discussion at [1]. I don't have enough time at the moment.
Would you be able to test the latest upstream avrdude and see if it
works without needing to change anything on boards.txt?

[1]: https://github.com/arduino/ArduinoCore-avr/issues/436#issuecomment-968348411

Thanks a lot,