I'm studying about STM32 low power modes, and after program the device with
__Wfi instruction I cant program another firmware in the device, I tried to use the STM utility to erase the code, but it show that the flash had write protection.
The first error that show is :
adapter speed: 24000 kHz adapter_nsrst_delay: 100 Info : clock speed 24000 kHz Info : STLINK v2 JTAG v34 API v2 SWIM v7 VID 0x0483 PID 0x3748 Info : using stlink api v2 Info : Target voltage: 3.192646 Error: init mode failed (unable to connect to the target) in procedure 'program' in procedure 'init' called at file "embedded:startup.tcl", line 495 in procedure 'ocd_bouncer' ** OpenOCD init failed ** shutdown command invoked
After a search, I found that I can get the firmware putting the
boot0 in VCC, so I did this, and the follow error was shown:
** Programming Started ** auto erase enabled Info : device id = 0x10076413 Info : flash size = 512kbytes Error: stm32x device protected Error: failed erasing sectors 0 to 0 embedded:startup.tcl:476: Error: ** Programming Failed **
My board has a stm32f407vet6 processor. I'm using a ST-LinkV2 clone, for download and debug purposes.