Hi, I have an STM32F407IE on a custom board and I am programming/debugging with an Olimex ARM-USB-TINY-H using OpenOCD. I have come across this error with two separate microcontrollers now. It seems as though the microcontroller enter some type of error state while running (I have not had it attached to the debugger when this error happens). Once it occurs, I try running it through the debugger and it refuses to run. When running it through gdb, it gives me the following:
stm32f4x.cpu – clearing lockup after double fault
Program received signal SIGINT, Interrupt.
Using OpenOCD, I can issue a ‘reset halt’ command to halt the microcontroller, but when I do a ‘flash probe 0’, I get the following response:
device id = 0x10016413
JTAG-DP STICKY ERROR
MEM_AP_CSW 0x23000051, MEM_AP_TAR 0x1fff7a24
STM32 flash size failed, probe inaccurate - assuming 1024k flash
flash size = 1024kbytes
flash ‘stm32f2x’ found at 0x08000000
If I try to erase the flash and write a new image, I get the following error:
auto erase enabled
stm32x device protected
failed erasing sectors 0 to 7
in procedure ‘flash’
This sounds like a hardware error to me, but is there anything else I can do in OpenOCD to track down what’s happening? Does anyone have any suggestions? Any other logging information that I could provide to help?