Skip to content

Burning the bootloader via ISP (advanced)

Nico edited this page Aug 16, 2015 · 18 revisions

This is for advanced users who want to burn the bootloader with an external ISP directly. This is useful if you try to debug the bootloader and upload it over and over or if you simply want to burn another/new bootloader to any Arduino/AVR.

You can do this with your program of choice (e.g. avr-dude) or use the Arduino IDE. You can either use an official ISP or let your Arduino Uno/Mega/Leonardo/Micro/16u2 act as ISP.

###Wire up your Arduinos

  1. Unplug both Arduinos from USB. Never change wires when the devices are powered!
  2. Connect all wires as described below
  3. Double check all connections
  4. Plug in your Arduino that acts as ISP into USB
  5. Do not plug in both Arduinos to USB at the same time when 5V are connected!

####Connections for burning a 8/16/32u2 bootloader

Connections

Pin connections:
328/2560 - 16u2
GND      - GND
5V       - 5V
MOSI     - MOSI
MISO     - MISO
SCK      - SCK
PIN 10   - 16u2 RESET
HoodLoader2 Fuses:
low_fuses=0xEF
high_fuses=0xD8 (boot to Bootloader)
extended_fuses=0xFC (no HWBE)
unlock_bits=0x3F
lock_bits=0x0F

Official DFU + USB-Serial Fuses:
low_fuses=0xEF
high_fuses=0xD9 (boot to program)
extended_fuses=0xF4 (with HWBE)
unlock_bits=0x3F
lock_bits=0x0F

####Connections for burning a 32u4/328/... bootloader

Connections

Pin connections:
328/2560 - 32u4
GND      - GND
5V       - 5V
MOSI     - MOSI
MISO     - MISO
SCK      - SCK
PIN 10   - 32u4 RESET
HoodLoader2 Fuses:
low_fuses=0xFF
high_fuses=0xD8 (boot to Bootloader)
extended_fuses=0xFC (no HWBE)
unlock_bits=0x3F
lock_bits=0x2F

DFU Fuses:
low_fuses=0xFF
high_fuses=0xD9 (boot to program)
extended_fuses=0xC4 (with HWBE)
unlock_bits=0x3F
lock_bits=0x2F

Original Fuses:
low_fuses=0xEF
high_fuses=0xD8 (boot to bootloader)
extended_fuses=0xCB (no HWBE)
unlock_bits=0x3F
lock_bits=0x2F

###Setup your Arduino as ISP

  1. Select the Arduino board that acts as ISP (menu Tools->Board->Uno/Mega/...)
  2. Upload the Arduino as ISP sketch from HoodLoader2/examples

ArduinoISP

###Burning the bootloader

  1. Follow this tutorial to setup the ISP and other settings.
  2. Select under Tools > Board HoodLoader2 16u2
  3. In the Tools > Bootloader menu select HoodLoader2 Uno, Mega (or DFU)
  4. In the Tools > Programmer menu select Arduino as ISP (Leonardo).
  5. Hit under Tools "Burn Bootloader".