Note
The methods described here are intended for advanced users and require specialized equipment.
Learn about the ways to burn the bootloader on the Arduino Nano 33 IoT.
In this article:
- Connecting to the test points on the Nano 33 IoT
- Burn the bootloader with a debugger
- Burn the bootloader using another Arduino board as a programmer
Connecting to the test points on the Nano 33 IoT
Note
Improper soldering can void the warranty. Contact us before soldering if your board is under warranty.
To burn the bootloader on Arduino Nano 33 IoT, we need to use the SWD (Serial Wire Debug) interface. On the Nano 33 IoT, the two main pins for this interface (SWDIO/SWCLK) is available via test points on the bottom of the board, near the Arduino logo:
You’ll need a way to connect your programmer to these points (also called “pads”), such as:
- A 0.1" pitch 2x3 Pogo adapter.
- Soldering wire to the pads. If you use this method, you can use the header pins for +3V3, GND, and RST.
Burn the bootloader with a debugger
What you’ll need
- A debugging probe that is CMSIS-DAP compliant and that supports Serial Wire Debug, like this open source debugger (US only).
- Many debug probes use a 2x5 0.05" pitch header/cable. You may need a breakout board, like this one from Adafruit.
- A way to connect your programmer to your Nano 33 IoT board. See Connecting to the test points on the Nano 33 IoT.
Instructions
-
Connect the programmer to the SWD pads on the target Nano 33 IoT board:
Programmer Target (Nano 33 IoT) VTref +3.3V (pad) / 3.3V (header pin) SWDIO SWDIO (pad) SWCLK SWCLK (pad) GND GND (pad) / GND (header pin) RESET RST (pad) / RST (header pin) -
Connect the programmer to your computer.
-
Power the Nano 33 IoT by connecting it to your computer with a USB cable (the connections in the previous step do not power the board).
-
Open Arduino IDE.
-
Select Arduino Nano 33 IoT in the board selector or the Tools > Board menu.
-
Select Tools > Programmer > Atmel EDBG.
-
Select Tools > Burn Bootloader to burn the bootloader.
-
Monitor the progress in the console window. A successful operation will end with this output:
** Programming Finished ** ** Verify Started ** verified 6400 bytes in 0.544474s (11.479 KiB/s) ** Verified OK ** ** Resetting Target ** shutdown command invoked
Burn the bootloader using another Arduino board as a programmer
What you’ll need
- An extra Arduino board that runs at 3.3 V to use as the programmer.
- Note: certain Arduino boards can’t be used with the sketch that converts it to a programmer.
- Working: SAMD architecture boards (e.g., MKR boards, Nano 33 IoT, Zero).
- Untested: AVR architecture boards (e.g., Mega), but the sketch does compile for them.
- Not working: Nano 33 BLE
- It is possible to use an Arduino board that runs at 5 V as the programmer, but you’ll need to use level shifting circuitry on the programming lines to avoid exposing the target board to 5 V logic levels, which would damage it.
- Note: certain Arduino boards can’t be used with the sketch that converts it to a programmer.
- An SD slot for the programmer board, such as:
- A built-in SD slot , like on the Arduino MKR Zero.
- A compatible SD card shield, like the MKR SD Proto Shield.
- A common SD module.
- An SD card.
- A way to connect the SD card to your computer.
- A way to connect the programmer board to your Nano 33 IoT. See Connecting to the test points on the Nano 33 IoT.
Instructions
-
Rename the downloaded file to
fw.bin
. -
Connect your SD card to your computer.
-
Move
fw.bin
to the SD card. -
Eject the SD card from your computer.
-
Plug the USB cable of the Arduino board you will be using as a programmer into your computer.
-
Open Arduino IDE.
-
Use the Library Manager to install the Adafruit DAP library by Adafruit. If asked whether to install library dependencies, choose Install all.
-
When the library download is complete, select File > Examples > Adafruit DAP library > samd21 > flash_from_SD from the Arduino IDE’s menus.
-
Prepare the sketch:
-
If you’ve using a connected SD module, either make sure that the CS (Chip Select) pin is connected to pin 4, or edit this line to match the actual connection:
#define SD_CS 4
-
If your board has a built-in SD slot, then you can change this line:
if (!SD.begin(SD_CS)) {
to:
if (!SD.begin()) {
-
-
Select the programmer board using the board selector or Tools > Board menu.
-
Ensure the programmer board is selected in the Tools > Port menu.
-
Click Upload and wait until the sketch has uploaded successfully.
-
Unplug the programmer Arduino board from your computer.
-
Plug the SD card into the SD slot connected to your Arduino board.
-
Connect the programmer Arduino board to the target Arduino board as follows:
Programmer board Target board (Nano 33 IoT) VCC +3.3V (pad) / 3.3V (header pin) 10 SWDIO (pad) 9 SWCLK (pad) GND GND (pad) / GND (header pin) 11 RST (pad) / RST (header pin) -
Plug the USB cable of the programmer Arduino board into your computer.
-
Select Tools > Serial Monitor to see the Serial Monitor output as the programmer board flashes the bootloader file.
-
Wait until the process finishes, then disconnect the programmer board.