Hi, just used a more or less blank platformio.ini to re-burn the stock bootloader to my Arduino nano.
This worked fine, also fuse settings look good, BUT when setting the lock fuses, I got the following warning:
Maybe the standard lock fuse setting should be modified to mitigate the warning and possibly future errors. Should I create an issue already or could somebody reproduce?
If you add
board_bootloader.lock_bits = 0xCF
to the platformio.ini
the error is gone, yeah?
Then it’s that code that’s wrong
and it should be raised as an issue there.
1 Like
Shouldn’t it be 0xFF
as no lock bit is used as per here? I’ll try both and let you know once I did it.
Ah, my Original Arduino boards.txt
says you’re right
Well, the answer is - partially. What I found out:
- both lock and unlock bits currently are deprecated, so the warning only goes away if I modify both.
- Too keep the same behavior as specified in the boards.txt, I have to have a look in the datasheet and boards.txt
Original from boards.txt:
nano.bootloader.unlock_bits=0x3F
nano.bootloader.lock_bits=0x0F
Error message says that unused bytes have to be written to 1
.
According to datasheet, unused bits are (the same for lock and unlock bit mask):
So, I add 12
to the first nibble and yield:
board_bootloader.unlock_bits = 0xEF
board_bootloader.lock_bits = 0xCF
Result:
Warning gone. All fine. Will raise an issue.
1 Like