Introduction
The goal of this is to flash the Arduino Uno (ATmega328P) with a new bootloader. You might be interested in doing so for a variety of reasons but in my case, my friend’s board had issues with executing the Serial communication code and communicating with his PC. We suspected that there might have been an issue when the bootloader transferred over the control of the Microcontroller to the user program.
At a high level, we will require three (3) things:
- (Host Controller) Your PC with AVRDUDE installed and bootloader file downloaded
- (Programmer) Tigard board
- (Target) Arduino Uno
In this example, we will use the Optiboot bootloader as our bootloader. Other bootloaders and customised versions exist.
Setting up the Software
Installing avrdude
Note on avrdude built-in support for Tigard
Physical Connections
Link to the Tigard site (github repository): Github
The Tigard Board | |
---|---|
Figure 1: Image of the Tigard board | Figure 2: Close-up of the JTAG/SPI Pins on the Tigard |
Flashing the Bootloader
Downloading the bootloader
Setting fuses
Flashing process and command
Resources
- In-circuit programming essentials
- Arduino in-circuit programming: https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP
- Arduino & SPI: https://docs.arduino.cc/learn/communication/spi
- Arduino as bootloader: https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader/all
- Bootloaders
- Optiboot bootloader: https://github.com/Optiboot/optiboot
- Urboot bootloader: https://github.com/stefanrueger/urboot
- MiniCore bootloader based on Urboot (for ATmega8, ATmega48, ATmega88, ATmega168, ATmega328): https://github.com/MCUdude/MiniCore
- Atmel AVR Fuses
- Overview on AVR fuses: https://embedds.com/all-you-need-to-know-about-avr-fuses/
- Microchip’s documentation on AVR Fuses: https://microchipdeveloper.com/8avr:avrfuses
- Calculator to calculate fuse values: https://www.engbedded.com/fusecalc/