Electron bootloader recovery

I’m trying to recover my Electron’s bootloader following the instructions described in documentation.

I’m performing the next steps :

> reset halt
> flash protect 0 0 0 off
> program /Users/rickk/Downloads/bootloader-photon.bin verify 0x08000000
> flash protect 0 0 0 on 

but fails whenever y send the flash protect 0 0 0 off command :

> flash protect 0 0 0 off
Device Security Bit Set
failed setting protection for blocks 0 to 0

jtag status contains invalid mode value - communication failure
Polling target stm32f2x.cpu failed, trying to reexamine
stm32f2x.cpu: hardware has 6 breakpoints, 4 watchpoints
Previous state query failed, trying to reconnect
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc 

My connection with the jtag connector :

The GND connection between the elctron and the JTag is done, but isn’t clear in the images.

What I’m doing wrong ?

Thanks

I think these are the right commands:

init
reset halt
stm32f2x unlock 0
reset halt

The RDP (read-out protection) level of your Electron probably got set to 1. When you set it back to 0, you’ll be able to program it again, however everything on the device will be blank so you’ll need to program the bootloader, system and user firmware, and reset your server and device keys.

I tried your suggestion, but I get :

init
reset halt
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
stm32f2x unlock 0
device id = 0x200f6411
flash size = 1024kbytes
stm32f2x failed to unlock device
jtag status contains invalid mode value - communication failure
Polling target stm32f2x.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 100ms
Previous state query failed, trying to reconnect
Polling target stm32f2x.cpu failed, trying to reexamine
stm32f2x.cpu: hardware has 6 breakpoints, 4 watchpoints
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc

Thanks for the response.

Usually when you get “stm32f2x failed to unlock device” the STM32 processor is really broken and unrecoverable.

If you create a support ticket we can get you a replacement Electron. Reference this post so we know what troubleshooting steps you’ve done already.

Thank you so much for your responses. Currently I retried a couple of times your suggestions (connecting and disconnecting the programmer/electron) and it worked.

I don’t know why doesn’t work the first time, but I have now working my electron.

Thanks again

2 Likes