Photon Corrupted Bootloader

I have a light next to D7 and no wifi connectivity light. Support articles say this is a corrupted boot loader. How can I fix that?

If you are in the Dim D7 state, the bootloader can only be programmed using a SWD/JTAG programmer.

The instructions for a variety of debuggers can be found here.

Thanks. I found that page, unfortunately I am a software guy, not hardware. I found this post (Electron Wont boot up) which specified which pins to connect to. I looked at an st-link v2 and they come with manufactured cables to plug into a board. since the particle doesn’t have that kind of interface, do I need to build my own with an st-link compatible plug on one end and wires to plug in the bread board on the other? If so do, I use the SWIM connection?

I’m willing to do the leg-work on this but I’m trying to figure out where to start.

A ST-LINK/V2 clone device is the easiest and cheapest for the Photon or Electron. For SWD mode of the ST-LINK you only need to connect GND, SWDIO to D7 and SWCLK to D6. If you have jumper wires, that is all you need.

Hi. I got an emulator, and jump wires. the board is hooked up the the st-link as you instructed and its in DFU mode (blinking yellow). I ran the command

bin/openocd -s share/openocd/scripts -f share/openocd/scripts/interface/cmsis-dap.cfg -f share/openocd/scripts/target/nrf52-particle.cfg -c "adapter speed 1000" -c "transport select swd" -c "init" -c "flash list" -c "exit"

from the openocd version folder. I get an error

`scripts/interface/cmsis-dap.cfg -f share/openocd/scripts/target/nrf52-particle.cfg -c "adapter speed 1000" -c "transport select swd" -c "init" -c "flash list" -c "exit"
xPack OpenOCD x86_64 Open On-Chip Debugger 0.11.0+dev (2022-03-25-17:32)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
Info : auto-selecting first available session transport "swd". To override use 'transport select '.
DEPRECATED! use 'adapter speed' not 'adapter_khz'
adapter speed: 1000 kHz

Warn : Transport "swd" was already selected
swd
Error: unable to find a matching CMSIS-DAP device `

Any suggestions? Please don't tell me my photon is not repairable! :slight_smile:


Those are not the right commands for a ST-LINK/V2 with a Photon. Follow the instructions here instead.

Thanks for the clarification. Here is the complete script I’m running:

bin/openocd -s share/openocd/scripts/  -f share/openocd/scripts/interface/stlink.cfg -f share/openocd/scripts/target/stm32f2x.cfg -c "adapter speed 1000" -c "transport select swd" -c "init" -c "reset halt" -c "flash protect 0 0 8 off" -c "photon.hex" -c "flash protect 0 0 0 on" -c "flash protect 0 5 8 on" -c "reset" -c "exit"

I ran into a couple errors from the original script so I been troubleshooting it. The first was

C:\OpenOCD\share\openocd\scripts\target\stm32f1x.cfg:6: Error: Can't find target/swj-dp.tcl 
in procedure 'script' 
at file "embedded:startup.tcl", line 60 
at file "C:\OpenOCD\share\openocd\scripts\target\stm32f1x.cfg", line 6 

Based on this article debugging - OpenOCD - Can't find target/swj-dp.tcl - STACKOOM I added the path: -s share/openocd/scripts/ which fixed that error.

Now I’m getting Error: Can't change session's transport after the initial selection was made I removed the “transport select” and I get Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED Error: open failed

I can’t figure this one out. Any suggestions?

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