Skip to content

Burning the bootloader via ISP (advanced)

Nico edited this page Apr 14, 2018 · 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

Use a HoodLoader2 device as ISP

The 16u2 on the Arduino Uno/Mega dont have a pin 10 broken out. Use pin 4 as SS instead. If you use a 32u4 with HoodLoader2 want to use pin 10.

You need to solder the 4 pin header for this.

Setup your Arduino as ISP

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

ArduinoISP

Burning the bootloader

  1. Select under Tools > Board the to be flashed Arduino (HoodLoader2 16u2)
  2. In the Tools > Bootloader menu select HoodLoader2 Uno, Mega (or DFU)
  3. In the Tools > Programmer menu select Arduino as ISP.
  4. Hit under Tools "Burn Bootloader".