🛠 Réparer une UNO muette : 16U2, DFU et programmation ICSP

Arduino UNO R3 · avance · Schéma : IMG-uno-r3-avance-3-recuperation-usb-16u2-icsp.svg — UNO R3 avec zoom sur le connecteur ICSP 2×3 broches et la puce ATmega16U2, jump RESET-ATMEGA16U2, câble ISP entre deux cartes.

Objectives

Regain control of your board when uploading fails: understand the two processors on the UNO (the ATmega328P application processor with its STK500/Optiboot bootloader, and the ATmega16U2 which acts as the USB-to-serial bridge and has its own DFU bootloader), know how to restore either one, and bypass the bootloader via ICSP.

Hardware

Complete Code

  1. Diagnosis — is the 328P alive? Is an already uploaded sketch running? (Pulsing LED = bootloader OK, problem on the port/IDE side). 2) ICSP programming using a second UNO as ISP:
Câblage ISP (UNO programmateur -> UNO cible), broches identiques broche à broche :
  1 (MOSI)  -> 1 (MOSI)      2 (VCC 5V) -> 2 (VCC)
  3 (GND)   -> 3 (GND)       4 (MISO)   -> 4 (MISO)
  5 (SCK)   -> 5 (SCK)       6 (RESET)  -> 6 (RESET)
# Avec arduino-cli (une fois la carte cible « Arduino Uno » sélectionnée) :
arduino-cli core install arduino:avr
arduino-cli program --protocol arduino --board arduino:avr:uno firmware.hex

# Bootloader : « Graver la séquence d'initialisation » dans l'IDE, ou :
arduino-cli burn-bootloader -b arduino:avr:uno -p /dev/ttyACM0   # via ISP d'une carte ISP

# Si le port USB a disparu (16U2 bloqué par un reflash raté) :
# court-circuiter les deux broches du jump « RESET-ATMEGA16U2 » (à côté de la puce),
# brancher l'USB, puis flasher le firmware USB via DFU :
dfu-programmer atmega16u2 erase
dfu-programmer atmega16u2 flash atmega16u2-mk3-arduino-1.0.1.hex
dfu-programmer atmega16u2 reset

Expected Verification

After burning the bootloader via ICSP: the 328P blinks its bootloader again (LED L blinking rapidly at startup) and uploading via USB works again. After reflashing the 16U2 via DFU: the serial port reappears in the device manager. The final test: upload Blink, then unplug/replug — the LED starts on its own.

Common Errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials