Hi, just used a more or less blank platformio.ini to re-burn the stock bootloader to my Arduino nano.
![image](https://community.platformio.org/uploads/default/original/2X/3/33327cbe2cbb0b940c0d4ded131bb5effea767d8.png)
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 ![:wink: :wink:](https://community.platformio.org/images/emoji/twitter/wink.png?v=12)
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):
![image](https://community.platformio.org/uploads/default/original/2X/2/2a8729b0319335c2a076ea9db885d34e7ab4676a.png)
So, I add 12
to the first nibble and yield:
board_bootloader.unlock_bits = 0xEF
board_bootloader.lock_bits = 0xCF
Result:
![image](https://community.platformio.org/uploads/default/original/2X/f/f232c13703e582a1f8d83ebaefeb0a3857f993dc.png)
![image](https://community.platformio.org/uploads/default/original/2X/9/966be770e48a30d28930d5d7bb70e4e76438c877.png)
Warning gone. All fine. Will raise an issue.
1 Like