Is my photon dead?

Today I came from work and found my photon with the small blue LED lightly dim…

Upon reset, the photon does not reset… I apply power and immediately the light blue led comes on and nothing else happens.

Is it dead?

Can you enter Safe mode?

Nothing responds… Immediately after applying power the small blue led comes on… (Not the main rgb led) the other small one. So no… I can’t do anything with it… :confused:

The procedure is…

Hold BOTH button and release only RST. Did you try that?

Yup…

Nothing happens:

Do you remember what version of system firmware you were running before this happened?

Do you have a volt meter? If so could you measure what the RST pin’s voltage is with respect to GND? When you observe this measurement and press the RESET button what happens? Also what voltage do you see on 3V3 when all of that is happening? Thanks!

3.3v across reset switch. When pressed goes to 0.

On the 3v3 pin. It has 3.34v

I’ve flashed something 1 day ago, and it was working fine. I don’t remember what version I had :confused:

Any chance you remember which unit it is in the IDE and can retrieve it’s Device ID?

EDIT: Also if you an ST-Link V2 and can get a full 1MB memory dump that would be helpful.

device Id
30003b000447343138333038

I do have an stk link 2… Could you point me in the right direction?

Also have programmer shield v2

Oh kewl, yeah hopefully you have the original JTAG shield as well. If you have STM32 ST-Link Utility already skip to step 3.

  1. Download this tool: STSW-LINK004 and install
  2. Download this driver: STSW-LINK009, unzip into a folder. Run the stlink_winusb_install.bat file by double-clicking on it.
  3. Plug in your ST-Link V2. The driver install should succeed.
  4. Connect the ST-Link to your Photon as shown in this diagram (or just plug into the JTAG shield): https://docs.particle.io/datasheets/photon-datasheet/#jtag
  5. Plug your Photon into USB power using a USB cable.
  6. Open the STM32 ST-Link UTILITY application in Windows.
  7. Open the TARGET menu then click SETTINGS, make sure the PORT is set to JTAG (or SWD) mode.
  8. Open the TARGET menu and click CONNECT. You should be connected to the target. (the data window should populate)
  9. Make sure the address is 0x08000000 and the size is 0x100000
  10. Now open the TARGET menu, then OPTION BYTES. Ensure READ OUT PROTECTION is set to LEVEL 0. If not please note what it’s set to and change to LEVEL 0. Also make a note of which of the sectors (0-11) are write protected (the ones with check marks, no need to change their values) then hit APPLY.
  11. Now open the TARGET menu, then FILE… SAVE FILE AS… photon_30003b000447343138333038.bin. SAVE. You can email that to my first name at particle dot io :wink: Thanks!

Lemme go look in the logs at that ID, and after all this we can try to restore your Photon since you have JTAG.

1 Like

Well… I have all the tools… But I am running OS X Mac… So I guess I am out of luck ??

Aww man… I run OS X as well, but also run Parallels with Windows 8.1 Pro… I’m guessing you don’t have that? Windows and ST-Link v2 are super reliable… but I bet we can get some instructions for the new v2 programmer shield and OS X as well. Do you have that setup yet?

I haven’t set it up… But I have the v2 Programmer, V1 Programmer and STK Link :blush:

Kind of paranoid. Except for windows! :frowning:

Let me know… Il do it!

Ok let’s get started following the readme.md found here to get your programmer shield setup: https://github.com/spark/shields/tree/master/photon-shields/programmer-shield

Be careful not to erase your photon trying some of the test commands shown there… I’ll figure out the read commands, it’s gotta be dead simple. I typically use the ST-Link v2, but have had the new Programmer Shield up and running the debugger as well.

Let me get started!

Oh you know I forgot there are some ST-Link V2 tools for Mac OS X… I just don’t use them because I like the STM32 Windows Utility. And every time I try to erase the entire chip with this homebrew tool it doesn’t seem to work… however I just tried reading the device and that worked fine.

Use Homebrew to install stlink
brew install stlink

Then run:
st-flash read photon_30003b000447343138333038.bin 0x08000000 0x100000

:boom:

1 Like

Cool… Let me go for it.

File on its way via e-mail!

Awexome thanks! Looks mostly like it should… I’ll have to analyze it further tomorrow. I’ll send you a combined binary that you can use to get your Photon restored to v0.4.6. See if you can run st-flash erase and see if it does anything… mine doesn’t, it says it does but it resets and happily connects to the cloud again so I know it’s not erased. Actually I think we can just use the write command and it will override the write protected sectors. Mine just overwrote my photon here :smile: I’ll email you the combined binary… the command is st-flash write combined-0.4.6-photon.bin 0x08000000

Kaboom! Well… It worked!!! @BDub You are the man!

I feel like a genius, although we all know you are the real genius here :blush: !

Thanks for the help and the amazing and outstanding support!

BY THE WAY: While installing the tools for the Programming shield V2… I ran into some issues with the instructions. First the link config file is not in the link. I download it manually and followed the instructions but while make install, The make process halts with an error… I am running El Capitan. Maybe that’s the issue?

2 Likes