Difference between revisions of "Arduino: Restore Arduino UNO bootloader using avr dragon"
From Luky-Wiki
Lukas Dzunko (talk | contribs) (→Step 1) |
Lukas Dzunko (talk | contribs) (→Step 1) |
||
Line 15: | Line 15: | ||
==== Step 1 ==== | ==== Step 1 ==== | ||
+ | sudo avrdude -p m328p -c dragon_isp -P usb -e -U flash:w:optiboot_atmega328.hex -U lock:w:0x3f:m | ||
==== Step 1 ==== | ==== Step 1 ==== | ||
==== Step 1 ==== | ==== Step 1 ==== | ||
==== Step 1 ==== | ==== Step 1 ==== |
Revision as of 22:40, 13 February 2016
If you "play" a lot with Arduino UNO then you may end up with locked up device or broken boot loader. There is way out of this problem but you will need additional device. I am using avr dragon for ISP programming and following commands can be used to restore Arduino UNO boot loader.
Note: This work also for other Atmel based devices but configuration needs to be modified accordingly.
Step 1
Download optiboot_atmega328.hex
from optiboot at github.
Step 2
Erase chip:
sudo avrdude -p m328p -c dragon_isp -P usb -e
Step 3
Configure fuse and lock bits:
sudo avrdude -p m328p -c dragon_isp -P usb -u -U lfuse:w:0xff:m -U hfuse:w:0xde:m -U efuse:w:0x05:m -U lock:w:0x3f:m
Step 1
sudo avrdude -p m328p -c dragon_isp -P usb -e -U flash:w:optiboot_atmega328.hex -U lock:w:0x3f:m