Seeeduino LoRaWAN bootup issues

I’m trying to make a test bench of a couple Seeeduino LoRaWAN boards (w/o GPS), and I have come across the following issue:

Once in a while, a board is unable to boot. It is visible by the ‘L’ LED rapidly flashing. Looking at the schematics, this is actually wired to the STM32L ‘SCK’ pin, which is in the RisingHF chip.

I’m not sure what the bootloader has to do with this, but it might be the reason for it not booting.
The chip is currently running 3.3.1 firmware.
Pressing the reset button once or twice makes it sometime get ‘alive’ and I’ll be able to flash it.
When the device is in this broken state, it does actually enumerate as a USB device. However, you are unable to put it in bootloader mode through the ard-reset-arduino with the --zero flag, like the Arduino IDE does.

Due to screenshot limit, here’s another one of the schematic:

What I don’t quite understand is the startup problem of SAMD21?Or the lorawan module startup problem.

I dont understand either! Its the only thing that I can use as identification that it doesnt work.
It is fairly common that it doesn’t work, actually. I can make a video, that might help? I dont understand how the SPI is related to the non-booting issue of the samd21

How can I reflesh these things when I bricked the bootloader? The pins on the back dont seem to work.

Use SWD to burn. If SWD cannot work, the hardware may be broken.

I tried to use ATMEL-ICE with the SAM connector to mini-squid pins, but i was unable to get openocd to detect the chip. I could replicate this on my SAM4S board, when the chip has the security bit set. I have then to erase the chip in order to flash it again. However, there is no erase pin that i can poke to erase the flash of these samd21 chips, or so it seems…

We used Jlink connection SW interface for Bootloader burning.Never used the Erase PIN

I finally was able to flash it. I used the atmel-ice sam jtag & swd adapter (the little pcb with the 20 pin plug), and then hooked it up as follows (on the right):

This finally made the programmer find the pcb and i was able to recover all pcbs

Hi. is it possible to use the ST-link v2 to burn the bootloader? I have broken the bootloader. Regards

It seems to use SWD as well, so I wouldn’t be suprised if you can flash it through OpenOCD using the ‘swd’ protocol. You can use this PDF as source for the pinout: section 4.2

The openocd.cfg file I used is as follows:

source [find interface/cmsis-dap.cfg]

# chip name
set CHIPNAME at91samd21g18
set ENDIAN little

# choose a port here
set telnet_port 0

source [find target/at91samdXX.cfg]

I recommend downloading and installing openocd from source so you have the latest version. You can find the official mirror here: