Skip to content

Wrong lock bits for UNO, MEGA and other boards with 328 and 2560 #6340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vidmo91 opened this issue May 31, 2017 · 1 comment
Closed

Wrong lock bits for UNO, MEGA and other boards with 328 and 2560 #6340

vidmo91 opened this issue May 31, 2017 · 1 comment

Comments

@vidmo91
Copy link

vidmo91 commented May 31, 2017

Datasheet states (Atmel-42735B-ATmega328/P_Datasheet_Complete-11/2016, chapter 31, page 347), that lock bits 6 and 7 are unused and by default value is 1. Avrdude cant verify them after programming to 0, because they can't be programmed:
avrdude: verification error, first mismatch at byte 0x0000
         0xff != 0x3f

wrong, not working, default values:
uno.bootloader.unlock_bits=0x3F
uno.bootloader.lock_bits=0x0F
correct, working ones:
uno.bootloader.unlock_bits=0xFF
uno.bootloader.lock_bits=0xCF

@facchinm
Copy link
Member

Hi @vidmo91 ,
this problem was fixed by updating avrdude just before 1.6.12 (see #5202 for more info). The mainline version (6.3) doesn't contain the patch so it fails when checking the fuses. We didn't change all the values in boards.txt for compatibility reasons and only a warning should be reported if you use the bundled tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants