Skip to content

Burn the bootloader from another Arduino

Nico edited this page Aug 8, 2015 · 10 revisions

You can also use a 2nd Arduino to flash the bootloader. For example if you can't access the first Arduino for some reason. We are just uploading the installation sketch to another Arduino and connect the wires a bit different.

You can use any kind of Arduino Leonardo/Micro/Mega/Uno/Nano etc for this operation.

1. Prepare your Arduino

First remove all hardware/wires/usb-cable from your Arduino to ensure nothing is messing up the upload. Never change wires when the devices are powered!

2. Upload the installation sketch

  1. Connect your Arduino (that acts as uploader) to your PC
  2. Select the Arduino board that acts as uploader (do not select 16u2).
  3. Open the installation sketch Installation_Sketch.ino
  4. Edit the Settings if needed (for Uno, Mega, 8u2 or 32u2 board for example).
  5. Upload the installation sketch to your Arduino (Ctrl + U).
  6. Wait until it says "Done uploading". This may take a while.

board-programmer

3. Wire up your Arduino

Unplug both Arduinos from USB. Never change wires when the devices are powered! Connect all wires from the 2nd Arduinos main MCU to the 16u2. You also need to connect 5V-5V and GND-GND to power the board. Unplug the USB cable of the Arduino you are flashing. In this case you do not need the capacitor which we use in the standalone version.

Connections

Pin connections:
328/2560 - 16u2
GND      - GND
5V       - 5V
MOSI     - MOSI
MISO     - MISO
SCK      - SCK
PIN 10   - 16u2 RESET

4. Burn the bootloader

Once the installation sketch is uploaded to your main MCU you are able to burn the bootloader to your 16u2. It will automatically try to flash the bootloader once the sketch is uploaded and the Arduino is powered. You have 10 seconds (after plugging in) to enter the Serial Monitor to see some debug output if wanted.

Control via Serial:
  1. Open the Serial port monitor at baud 115200.
  2. No capacitor needed, ignore that.
  3. Read the instructions and wait.
  4. The 2nd Arduino will flash the new bootloader.
  5. Wait until the Serial Monitor says programming finished.
  6. You may close the Serial monitor now.

For more help have a look here.

This no longer looks that complicated. You dont need to input anything, just wait and look at the output. installation-sketch

5. Check bootloader installation

Now your Arduino should be flashed with the new bootloader. To check your HoodLoader2 installation read on here. If its not correctly installed read the instructions carefully and try again.