This is the only technique that does anything special. When you do the double reset the board goes into a state where it remains persistently running the bootloader program, which is indicated by a pulsing "L" LED. That can be used to recover the board from a state where a normal upload is not possible due to interference from the sketch program.
All the other reset operations you described have no special significance and are equivalent to just pressing the reset button once, which restarts the sketch program.
If you don't get a pulsing "L" LED after doing a double reset, it indicates one of two things:
- There is physical damage to the board that is causing the bootloader to not run
- The bootloader program is missing or corrupted
In the case of physical damage, it can be difficult to identify which components are damaged, and even after identification it may require special equipment and soldering skills to replace those components. For most people, this means that all but the most simple damage puts the board beyond economically feasible repair and the best thing is to replace the board.
In the case of a missing or corrupted bootloader, the board can be preserved by re-flashing the bootloader. I'll share instructions for doing that in case you want to give it a try:
Note: alternative methods are described at the end of the post.
Using an Arduino board as the programmer
You'll need
- An extra Arduino board that runs at 3.3 V to use as the programmer.
- Any of the SAMD architecture boards (e.g., MKR boards, Nano 33 IoT, Zero) will work fine.
- The sketch is too large for the AVR architecture boards (e.g., Mega), so they can't be used.
- The sketch doesn't compile for the Nano 33 BLE, so it can't be used.
- A way to make the connections to the SWD pins on your target Arduino board.
On the MKR1000, it is a 0.05" pitch 2x5 male header on the top of the board, which you will need an adapter and cable for.
Instructions
-
Select Sketch > Include Library > Manage Libraries... from the Arduino IDE's menus.
-
Wait for the download to finish.
-
In the "Filter your search..." field, type "Adafruit DAP library".
-
Press Enter.
-
Click on "Adafruit DAP library by Adafruit".
-
Click the Install button.
-
Wait for the installation to finish.
-
Click the Close button.
-
Select File > Examples > Adafruit DAP library > samd21 > flash_MKR_bootloaders from the Arduino IDE's menus.
(despite the "MKR" in the sketch name, this also supports the Nano 33 IoT) -
Select your programmer Arduino board from the Tools > Board from the Arduino IDE's menus.
-
Select the port of the programmer Arduino board from the Tools > Port from the Arduino IDE's menus.
-
Select Sketch > Upload from the Arduino IDE's menus.
-
Wait for the upload to finish successfully.
-
Unplug the programmer Arduino board from your computer.
-
Connect the programmer Arduino board to the target Arduino board as follows:
Programmer Target VCC +3V3 1 SWDIO 2 SWCLK GND GND 0 RESETN MKR1000 SWD header pinout:

-
Plug the USB cable of the programmer Arduino board into your computer.
-
Select Tools > Serial Monitor from the Arduino IDE's menus.
-
Select "No line ending" from the dropdown menu near the bottom right corner of the Serial Monitor window.
-
You should see some instructions for using the sketch in the Serial Monitor output field.
This includes a menu of the boards supported by the sketch:Select Arduino MKR board to erase and flash with bootloader: Z -> Arduino Zero (6504 bytes) MZ -> Arduino MKR Zero (6408 bytes) 1000 -> Arduino MKR 1000 WIFI (6408 bytes) 1010 -> Arduino MKR WIFI 1010 (7984 bytes) [...]Find your target Arduino board on the list and note the code written to the left of it on the list.
-
Type the code for the target Arduino board in the Serial Monitor's input field.
-
Click the Send button to the right of the Serial Monitor input field.
-
The Serial Monitor output field should now show the board you selected and the progress of flashing the bootloader to the target Arduino board.
Wait for it to show "Done!" -
Unplug the programmer Arduino board from your computer.
-
Disconnect the programmer Arduino board from the target Arduino board.
Alternatives
These are some alternatives to the "Adafruit DAP" method I described above. I'll share one here:
Using a CMSIS-DAP debug probe as the programmer
If you have a CMSIS-DAP compliant debug probe, you can just do this instead:
- Connect the debug probe to your Arduino board.
- Select Tools > Programmer > Atmel EDBG from the Arduino IDE's menus.
- Select Tools > Burn Bootloader from the Arduino IDE's menus.
The "Burn Bootloader" process should now finish successfully.