SAMD21 enter bootloader mode, without double tap reset


I’m using a feather M0 board with a SamD21 MCU. By double tapping, the reset bottom the COM port changes and the MCU is in bootloader mode. I can now select the COM of the “bootloader mode” and flash the MCU. After I flashed the chip the MCU changes like expected to the “run mode” COM port.

Now when in “run mode” without tapping the reset I can flash the MCU again without any problem. I do see the COM port switch for a second between “run mode” and “bootloader mode”.

So in someway PlatformIO is able via USB to force a double tap to my MCU and get into “bootloader mode”. Does anybody know how this is done?

When programming the MCU via Bossac (see command), I do need to put the MCU manually in “bootloader mode” via a double reset.

“.\bossac.exe -e -w -v -b .\firmware.bin -R”


Pretty sure it’s this one

Basically open the serial port at 1200 baud and wait for a new port to appear.

I’ve looked through the GitHub - platformio/platformio-core: A professional collaborative platform for embedded development code but couldn’t actually find the python code where this is handled though :(.

1 Like

Yeah lol it’s exactly like that. Look at the USB CDC driver code for the SAMD21 series from Adafruit which handles the virtual COM port opening…


wow, I tried it just now and it works like a charm.

Thanks :grinning:

1 Like