Dim d7 pin on 3g electon help needed

hi guys

i have a 3g electron, it has a d7 led that is dim lit, no other led is on, no status led, im not sure how to fix this and hope someone can help, im here for 2 days so hope to get it sorted if posible, only have a laptop and usb cable so dont no if thats enough, no buttons seam to do anything, and as far as im aware te laptop doesnt know anything is pluged in

any help would be amazing
thanks Karl

The flash memory on your Electron has been erased. The only way to recover it is using a SWD/JTAG programmer; you won’t be able to do it with just your laptop, unfortunately.

https://docs.particle.io/reference/developer-tools/jtag/

hi so im guessing mine is a gen 2, and i require a debug unit aswell or have i read this wrong,

looking at the unit as i cant get into dfu mode im thinking it will be ok as you said nothing is on the unit,

this is what i found and think is the process?

  • Connect your Particle device to the debugger:
  • Connect the debugger to your computer or Chromebook
  • Or, for some Android phones, use a USB OTG adapter between the debugger and your phone.
  • Power your Particle device by USB or battery. It cannot be powered from the debugger.
  • Put your Particle device in DFU mode (blinking yellow) by holding down MODE and tapping RESET. Continue to hold down MODE while the status LED blinks magenta (red and blue at the same time) until it blinks yellow, then release MODE.

The exact process will depend on which debugger you use. You won’t be able to get into DFU mode because the bootloader has been erased. The only way is to use an external programmer.

The Electron is a Gen 2 device so one option is a ST-LINK/V2 SWD/JTAG programmer. There are clones available for less than US$10 which work fine.

The other options include:

  • Particle Debugger, which is no longer sold
  • Generic CMSIS-DAP debugger, which can also program Gen 3 and P2 devices
  • Segger J-LINK, which is expensive and normally used only for mass flashing many Gen 2 or Gen 3 devices. Does not currently work with the P2.

thank you for the replys i need to do some research now this is a bit out of my depth so not sure how i will go but either way i need some extra gear

thanks Karl

@rickkas7

i have got myself a debugger, on it is has 6 pins in total
gnd
cts
5v
txd
rxd
dtr
are any of theres pins correct or will this one not work?
thanks karl

Those pin names look more like the pins for a USB to TTL UART serial adapter, not a debugger.

The pins are typically power sense (to 3V3), SWDIO (to D7), SWCLK (to D6) and GND.

ok thanks i will see if i can find something else

hi i know this has been going on for a long time and i now have a particle debugger,

i have been working my way through Using SWD/JTAG | Reference | Particle

and can sort of get it happening but it all stops when i get this message in the CLI
Info : Listening on port 3333 for gdb connections any thoughts i have no idea

What exact instructions did you follow? The gdb server should only be started for source-level debugging, not for restoring a device with Dim D7.

so in the link above i followed the instructions for particle debug using openocd

downloaded the hex file for electron, connected debugger and election via usb and power to the electron,
found the right file location, copied the first line of code
bin/openocd -f share/openocd/scripts/interface/cmsis-dap.cfg -f share/openocd/scripts/target/nrf52-particle.cfg -c “adapter_khz 1000” -c “transport select swd” -c “init” -c “flash list” -c “exit”

ran that ok then went down to the same for gen 2 then when i run this after i change the file location

When positioned in the openocd version directory above, this command will flash a Gen 2 device:

$ bin/openocd -f share/openocd/scripts/interface/cmsis-dap.cfg -f share/openocd/scripts/target/stm32f2x.cfg -c "adapter_khz 1000" -c "transport select swd" -c "init" -c "reset halt" -c "flash protect 0 0 8 off" -c "program /Users/rick/Downloads/photon.hex" -c "flash protect 0 0 0 on" -c "flash protect 0 5 8 on" -c "reset" -c "exit"

this is what i get,
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: FW Version = 1.10
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
Info : [stm32f2x.cpu] Cortex-M3 r2p0 processor detected
Info : [stm32f2x.cpu] target has 6 breakpoints, 4 watchpoints
Error: [stm32f2x.cpu] clearing lockup after double fault
Info : [stm32f2x.cpu] external reset detected
Info : starting gdb server for stm32f2x.cpu on 3333
Info : Listening on port 3333 for gdb connections