Skip to main content

Flash Xiao Sense Bootloader

Xiao sense NRF52840 comes with a bootloader which connects seamlessly with Arduino for flashing and also provide as option to upload UF2 format firmware using a storage device option when the reset button is double pressed.

But once you start working with Zephyr and NRF connect and program the board using J-Link, the bootloader will get wiped out, and you can no longer upload firmware.

So here is a quick guide to flash the original bootloader to Xiao Sense NRF 52840

You will need

  1. Bootloader in HEX format.
  2. J-Link device / programmer with pins soldered to the board or use a Seeed Xiao mother board which has pogo pins connecting to the programming pins under the Xiao Sense board (you already have this setup while flashing Zephyr)
  3. Segger J-link software https://www.segger.com/downloads/jlink/ (you already have this setup while flashing Zephyr)

The bootloader is easily available in your Arduino folder with path (change username)

C:\Users\___UserName___\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\1.1.9\bootloader\Seeed_XIAO_nRF52840_Sense

Image

Now in windows application search - search J Flash tool and open it. It looks as below

Image

Next File > Open Data File and locate your bootloader Hex File. Your hex file will be loaded on the right side

Image

Then go to File > New Projects and select your hardware device in from the selection option. Here it will be NRF 52840 ... and then Press OK

Image

Now choose Target > Production Programming and your device will be erased, flashed and then verified.

Image

A popup will appear to show the programming progress

Image

There is one final and important step. Now again access Target > Manual Programming > Start Application.

Image

That's all now your board is as lovely as it was when you bought it.