How to unbrick Xenon (return to factory default firmware)

xenon
Tags: #<Tag:0x00007fe21df65430>

#1

Hi,
I have Xenon, behaving strangely in an unknown state. I have Segger J-Link and would like to program Xenon into the factory default firmware. Is there any instruction how to do it?


#2

Can you elaborate or provide a video?
Can you get into DFU Mode?


#3

Hi, I would like initially to use Xenon as a standalone device (not a part of mesh network) talking to my phone and doing things like sensors reading, on/off, etc. I did follow the instruction from here https://medium.com/home-wireless/using-segger-studio-and-nordic-sdk-with-particle-xenon-91e34aeb632a to install Adafruit bootloader and use it Arduino style. I can’t get into DFU mode now. The nRF52840 chip coming from factory most likely comes with blank flash memory, so Particle does the programming of Xenon. My question is how can I flash the Particle original firmware (the bootloader, Particle OS, Nordic libraries, whatever else is there) into my Xenon.


#4

You can have a look here
https://docs.particle.io/support/particle-tools-faq/jtag/#openocd-commands-3rd-generation-


#5

Thanks for the link. Unfortunately only the Gen 1 and 2 devices are covered and the Jlink is not covered. That part of documentation is old, not updated and very complex. Most microcontrollers today can be flashed with a single click, using a single *.hex or *.bin file instead of typing a dozen on command line commands (easy to make a mistake) Surely the Particle production must use a quicker and simpler way


#6

Really?


#7

@janek after some research and trying it myself, you can un-brick a Xenon, Argon and Boron using a NRF52 DK (or similar)

A full explanation is coming but you can clone this repository. Then, you can follow the instructions at the end of the Readme.

You need to download a bootloader binary from the release page on Github. You’ll also need the soft device.

Good luck! :slight_smile:


Bricked boron after using nrf sdk
#8

Thanks a lot, much appreciate it. I will check it when back from my trip. Will it work with J-link or do I need to buy a Particle Debugger? Are the Particle, Adafruit and Nordic bootloaders compatible?


#9

This is specifically for J-Link.

Particle’s boot loader is different from anything else.


#10

@janek, revisiting this:

Just remember you’ll need to program the system part and the tinker app to make sure everything is working afterwards. My xenon got into a weird state probably due to programing an image out of order.

Here are the steps for anyone else who’s interested:

  1. Run the following to program the soft device
    ./nrfjprog.sh --flash-softdevice /path/to/s140_nrf52_6.0.0_softdevice.hex

  2. Then, run to program the bootloader.
    ./nrfjprog.sh --flash-bootloader-bin /path/to/xenon-bootloader@1.3.0-rc.1.bin 0xf4000

  3. The device should be blinking yellow. Next, let’s program the system part:
    particle flash --usb /path/to/xenon-system-part1@1.3.0-rc.1.bin

  4. Finally, lets flash Tinker to make sure everything works!
    particle flash --usb /path/to/xenon-tinker@1.3.0-rc.1.bin

You should be able to substitute any version of deviceOS with the one I used above. Just make sure that the boot loader, system part and Tinker are all the same version.

Here’s a picture of my setup:


#11

@jaredwolff thank you for sharing your knowledge and experience with community. Much appreciate it, it saves a lot of time


#12

You’re welcome. I hope it worked for you :grinning: