Re-Flash Tinker to Reset your Particle Photon

by Jul 15, 2019Particle

The Particle Photon is a powerful and easy to use platform for building WiFi-connected projects. However, as you work on different projects, you may occasionally run into issues that cause the Photon to get “stuck.” Here’s the problem. You normally flash firmware to the Particle Photon wirelessly from the cloud IDE. But, certain issues cause the Photon to lose its connection to the Particle cloud. If this happens, you will be unable to flash new firmware to the board using the online IDE like you normally would. Therefore, you will be stuck with non-functional firmware on the board. This article covers how to fix this issue.

 

Is your Particle Photon breathing green?

One of the primary issues the instructions in this post will solve is if your Particle Photon loses its connection to the Particle Cloud. If your Photon shows a breathing green LED, it means your device has a WiFi connection but is not connected to the Particle Cloud. The most common cause for this issue is that your user firmware gets stuck in a loop somewhere. This might be a while loop that never meets the condition to end.

// This is a completely pointless program that will break your Photon

void setup() {}

void loop() {
    while(1) {
        
    }  
}

For now though, if your Particle Photon is offline, you can’t even upload corrected firmware anyway. So let’s fix your Photon.

Step 1: Download and Install the Particle CLI Tool

The first step is to download the Particle CLI tool. This software will allow us to interact with the non-functional Particle Photon and with the Particle Cloud. Because the CLI tool uses a USB connection to the Particle Photon to operate, it will not matter that the Photon is currently stuck and unable to communicate with the Particle Cloud.

Installing the CLI tool is easy. Particle provides good documentation on the process in the documentation.

Step 2: Connect the Photon to your Computer

The next step is to simply connect the malfunctioning Particle Photon to your computer via USB.

Step 3: Place the Photon into DFU Mode

In order to enable communication between the Particle Photon and the CLI tool running on your computer, you will need to place the Photon into DFU mode. DFU mode is indicated by a flashing yellow LED.

  1. Hold both the Setup and the Reset buttons.
  2. Release only the Reset button while continuing to hold the Setup button.
  3. Wait until the LED starts to flash yellow. It will first flash magenta which is a different mode but after that it will flash yellow.
  4. Release the Setup button.

 

Step 4: Flash Tinker onto the Photon

To get the Particle Photon back into working order, we will flash Tinker onto the board. Tinker is the firmware that comes pre-installed on the Photon when you take it out of the box. In the Particle CLI, use the command below to flash Tinker onto the board.

Particle flash --usb Tinker

Because we are flashing the firmware over USB, it does not matter that the Photon does not stay connected to the Particle Cloud properly. Once you get Tinker working on the Photon, you can flash any other firmware you’d like using the online IDE as you normally would (but maybe fix whatever program caused the issue in the first place.

Share This