How to unbrick Seeduino XIAO board without external programmer if it was bricked while flashing… (2024)

The bootloader is definitely damaged. What to do? Where to call?
Let’s start reading the documentation.
The first thing that comes to mind is to use an external programmer and flash the bootloader into the board using it. But for this, you need a programmer, and I’m too lazy to get up from the table in order to take it.

On the forums, there is only one solution to this problem — flashing the .BIN file using an external programmer.
But why, the ARM® Cortex®-M0+ have two memory sections, each of which can be accessed via USB.

What does the manufacturer offer us?
Hmmmm…

Enter Bootloader Mode

Sometimes the Seeeduino XIAO port may disappear when user programming process fails. We can solve this problem by the following operation:
- Connect the Seeeduino XIAO to your computer.
- Use tweezers or short lines to short the RST pins in the diagram twice.
- The orange LED lights flicker on and light up.
At this point, the chip enters Bootloader mode and the burn port appears again. Because the samd21 chip has two partitions, one is the Bootloader and the other is the user program. The product will burn a bootloader code in the system memory when it leaves the factory. We can switch modes by performing the above steps.

Hmmm… And is that all the information? Let’s admit. Will you give the bootloader file?
Not?
Why?
Where should I look for the bootloader file?
Don’t clear.
When the board is switched to bootloader mode, it is connected to the computer like a flash drive, and the bootloader is located at the root of this drive. But I can’t find any information about changing the bootloader using this way.

After a little googling, I found out that the board can be used with CircuitPython.
In the process of searching for a solution to my problem, I became interested in how it works. This interest will help us to unbrick this board in the future.

CircuitPython is a programming language designed to simplify experimenting and learning to program on low-cost microcontroller boards. It makes getting started easier than ever with no upfront desktop downloads needed. Once you get your board set up, open any text editor, and get started editing code. It’s that simple.

CircuitPython is designed to run on microcontroller boards. A microcontroller board is a board with a microcontroller chip that’s essentially an itty-bitty all-in-one computer. The board you’re holding is a microcontroller board! CircuitPython is easy to use because all you need is that little board, a USB cable, and a computer with a USB connection. But that’s only the beginning.
Other reasons to use CircuitPython include:

You want to get up and running quickly. Create a file, edit your code, save the file, and it runs immediately. There is no compiling, no downloading and no uploading needed.
You’re new to programming. CircuitPython is designed with education in mind. It’s easy to start learning how to program and you get immediate feedback from the board.
Easily update your code. Since your code lives on the disk drive, you can edit it whenever you like, you can also keep multiple files around for easy experimentation.
The serial console and REPL. These allow for live feedback from your code and interactive programming.
File storage. The internal storage for CircuitPython makes it great for data-logging, playing audio clips, and otherwise interacting with files.
Strong hardware support. There are many libraries and drivers for sensors, breakout boards and other external components.
It’s Python! Python is the fastest-growing programming language. It’s taught in schools and universities. CircuitPython is almost-completely compatible with Python. It simply adds hardware support.

Wow, cool. How to install it?

Download the official CircuitPython Bootloader for Seeeduino XIAO.
A .uf2 should be downloaded.
Plug-in the Seeeduino XIAO to your PC via USB Type-C.
Entering the DFU bootloader mode by using a jumper to short connect RST Pins twice quickly.

An external drive named Arduino should appear in your PC. Drag the the downloaded CircuitPython .uf2 files to the Arduino drive.

How to unbrick Seeduino XIAO board without external programmer if it was bricked while flashing… (2)

Once loaded the CircuitPython bootloader, unplug the USB Type-C and re-connect. A new external drive called CIRCUITPY should appear.

How to unbrick Seeduino XIAO board without external programmer if it was bricked while flashing… (3)

Now, CircuitPython is loaded on Seeeduino XIAO! All you need to do it’s to write you python program and name it main.py and drag it onto the CIRCUITPY drive.

CircuitPyhton Basics
Running Blink using CircuitPython:
Note: simply copy and save the following code and name it main.py, and drag it to CIRCUITPY drive.

import time
import board
from digitalio import DigitalInOut, Direction
led = DigitalInOut(board.D13)
led.direction = Direction.OUTPUT
while True:
led.value = True
time.sleep(1)
led.value = False
time.sleep(1)

You should see the built-in LED starts to blink!

Yes, it flashes. The bootloader installation process is described well, there is a link to the file, cool!
I played around a bit with CircuitPython and remembered that I needed to look for an Arduino bootloader to continue working.

I started digging through the documentation for CircuitPython and found a detailed migration mechanism from CircuitPython to Arduino bootloader. And I was surprised in this way.

Start by plugging in your board, and double-clicking reset.
Within Arduino IDE, select the matching board, say Circuit Playground Express.

How to unbrick Seeduino XIAO board without external programmer if it was bricked while flashing… (4)

Select the correct matching Port:

How to unbrick Seeduino XIAO board without external programmer if it was bricked while flashing… (5)

Create a new simple Blink sketch example:


void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(1000)
digitalWrite(13, LOW);
delay(1000);
}

Make sure the LED(s) are still green, then click Upload to upload Blink. Once it has uploaded successfully, the serial Port will change so re-select the new Port!

Very simple and beautiful. Thanks to Adafruit for this solution.

Strangely, something like this has not been described in the official documentation.
But this method is more working.
Criticize me if you see fit.
Arsenii was with you, we will meet in new articles.

How to unbrick Seeduino XIAO board without external programmer if it was bricked while flashing… (2024)
Top Articles
Latest Posts
Article information

Author: Jonah Leffler

Last Updated:

Views: 6660

Rating: 4.4 / 5 (45 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Jonah Leffler

Birthday: 1997-10-27

Address: 8987 Kieth Ports, Luettgenland, CT 54657-9808

Phone: +2611128251586

Job: Mining Supervisor

Hobby: Worldbuilding, Electronics, Amateur radio, Skiing, Cycling, Jogging, Taxidermy

Introduction: My name is Jonah Leffler, I am a determined, faithful, outstanding, inexpensive, cheerful, determined, smiling person who loves writing and wants to share my knowledge and understanding with you.