[solved] Photon not running newly flashed firmware

Have this really weird issue.

My Photon has been working great since I got it. Today one of my Core’s hit the bucket, so I took my Photon and flashed the same code I had on my Core.

All is well, Photon is working well, then I decide to replace the Photon with another Core I found. Flashed the spare Core and everything works.

Now I am trying to reuse the Photon used above for something else. I flash via the WebIDE, the Photon flashes magneta but it still runs the old code that I flashed from the Core.

I did a factory reset, flashed 4.4/4.3 and all are doing the same thing.

I created a new project that blinks d7, it flashes successfully but still runs the old code. I have no idea what’s going on…

Any tips?

If you refresh the IDE, does it still show up as Others?

When you flash code to this Photon, does it take more than a couple seconds… I’m wondering if maybe it’s sending Core compiled code which would be 70KB instead of the modular Photon code 4KB.

When it flashes successfully, do you see the magenta stop flashing and immediately turn white (photon resetting), or is something else happening?

I removed this Photon and readded it and then it showed up as Others. Once I refreshed the IDE it showed up as a Photon.

It flashes fairly quickly like a Photon should. I also downloaded the bin file and its only a few KB (1-2 I think it was).

After flashing photon turns white and then immediately breathes cyan. Almost too fast I say. My other Photons flash green for a few while it connects to WiFi.

I would recommend putting 0.4.3-rc2 on it and wait for v0.4.4-rc.3 https://github.com/spark/firmware/releases/tag/0.4.3-rc2

Do this locally as follows:

The updates can also be applied to offline devices using dfu-util.

Put the device in DFU mode (flashing yellow LED)
open a terminal window, change to the directory where you downloaded the files above, and run these commands:
Photon:

dfu-util -d 2b04:d006 -a 0 -s 0x8020000 -D system-part1-0.4.3-photon.bin
dfu-util -d 2b04:d006 -a 0 -s 0x8060000 -D system-part2-0.4.3-photon.bin
dfu-util -d 2b04:d008 -a 0 -s 0x80A0000:leave -D tinker-photon.bin

Give this a try and see how it behaves after :wink:

1 Like

I’ll give it a try in the AM. I’ll post an update with the results.

1 Like

This resolved the issue. Weird what happened, but thanks!!

Carsten

1 Like

That is strange… the factory reset should have fixed it if it was just the tinker command that solved your issue. I wish we could reproduce exactly how you got into that state to make sure it doesn’t keep happening. If you find a way to reproduce it, please let us know! :sunny: