# Particle photon randomly crashing / indicating corrupt bootloader?

**URL:** <https://community.particle.io/t/particle-photon-randomly-crashing-indicating-corrupt-bootloader/58192>\
**Category:** Firmware\
**Created:** [October 25, 2020, 11:26am UTC](https://community.particle.io/t/particle-photon-randomly-crashing-indicating-corrupt-bootloader/58192 "2020-10-25T11:26:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brounzer](https://avatars.discourse-cdn.com/v4/letter/b/b782af/32.png) [@Brounzer](https://community.particle.io/u/Brounzer)\
**Post date:** [October 25, 2020, 11:26am UTC](https://community.particle.io/t/particle-photon-randomly-crashing-indicating-corrupt-bootloader/58192/1 "2020-10-25T11:26:26Z")

</div>

Hi,

**Issue**  
I’m experiencing a reliability problem with a Photon, whereby it will (as far as I’ve analyzed) crash randomly with reset reason power\_down and then reboot. However, sometimes it will also enter a mode in which the Photon’s onboard LED is off, but only a dimly lit LED at D7 remains on in blue.  
Reading [https://docs.particle.io/tutorials/device-os/led/photon/#no-status-led](https://docs.particle.io/tutorials/device-os/led/photon/#no-status-led) , leads me to believe this is a corrupt bootloader? But then again, if I reset the Photon using the momentary push button, it will restore normally and then go through the same.  
A crash occurs never during application code being executed in setup(), but it does when entering loop(), sometimes immediately. Sometimes after 5 minutes.  
I doubt whether application code can be blamed. Since I don’t think this could trigger power\_down. I’d rather expect stack overflows / SOS and corresponding blinking.

**Context**  
I’m using this Particle photon for a specific self-made digital clock that uses LEDs. Basically, it is an LED matrix controlled by SN74HC595s and I control the LEDs ‘brightness’ in an overall manner by indirectly PWMing an IRF640n from the Photon’s TX port. I’m open to share the source code and hardware schematic with you if needed. However I didn’t yet since because of what I tried (below) and what worked, I believe it may be caused by the specific Photon device.

**What I’ve tried**

I’ve tried the following steps

1. 
  - Stripping down the application code to a ‘bare minimum’ with no system thread, just automatic mode. Didn’t solve it.

2. 
  - Updating the device from 1.5.2 to 2.0.0. RC3. Didn’t solve it.

3. 
  - Put the device in safe\_mode, then reflash application code. Didn’t solve it.

4. 
  - Measure voltage at Photon Vin, which is neatly set to 5.00 V. Didn’t solve it.

5. 
  - Switch the Photon with a different one, flashing the exact same application code and on firmware 1.5.2. **This did solve it.**

Now, since this worked, I’d like to know if I can reflash the OS / Bootloader (not too experienced with what is running other than my application code) and if that could solve it? Are there ‘health or diagnostics’ options I can run that could detect something like this? Also open to other ideas.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [October 25, 2020, 12:04pm UTC](https://community.particle.io/t/particle-photon-randomly-crashing-indicating-corrupt-bootloader/58192/2 "2020-10-25T12:04:45Z")

</div>

Since you updated the device from 1.5.2 to 2.0.0 it’s most likely _ **not** _ the bootloader as this would also refresh that.  
However, you can download the bootloader binary from [here](https://github.com/particle-iot/device-os/releases) and flash it via CLI

Listening Mode (will work with any preinstalled bootloader)

```nohighlight
particle flash --serial <bootloader.bin>

```

or DFU Mode (only more recent versions)

```nohighlight
particle flash --usb <bootloader.bin> -v

```

The same can be done with the device OS binaries (best via DFU).  
If you want to flash the current default device OS version `particle update -v` would be the easiest.

However, when the issue sticks with a particular device chances are that it may be a hardware issue rather than device OS, bootloader or application firmware.

---

<div class="post-metadata">

**Author:** ![UMD](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/umd/32/5850_2.png) [@UMD](https://community.particle.io/u/UMD)\
**Post date:** [October 30, 2020, 9:58pm UTC](https://community.particle.io/t/particle-photon-randomly-crashing-indicating-corrupt-bootloader/58192/3 "2020-10-30T21:58:39Z")

</div>

Sounds very much like a hardware fault to me.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/3/2/3291e3c9351789fe8620ae5bcec8d3fec67ff221.png) [@system](https://community.particle.io/u/system)\
**Post date:** [May 1, 2021, 9:58am UTC](https://community.particle.io/t/particle-photon-randomly-crashing-indicating-corrupt-bootloader/58192/4 "2021-05-01T09:58:55Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
