Cortex M3 - Reset Mode

Hi!

I’m using the STM32F10x Arm Cortex M3, I needed to use a LED that was in the PB4, and for that I used the following commands:

 GPIO_PinRemapConfig(GPIO_Remap_SWJ_NoJTRST, DISABLE);    
 GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, DISABLE);

And then I could the LED on, however, now I’m not able to program it with another code. The returned error is:

Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: stm32f1x.cpu: IR capture error; saw 0x0f not 0x01
Polling target failed, GDB will be halted. Polling again in 100ms
Polling target failed, GDB will be halted. Polling again in 300ms
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* stm32f1x.cpu       cortex_m3  little stm32f1x.cpu       unknown
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: stm32f1x.cpu: IR capture error; saw 0x00 not 0x01
Error: Target not examined yet


in procedure 'reset'
make: *** [flash] Error 1

I read that there is some way of turning on in a mode that doesn’t execute the functions of the memory, however I was not able to do that.

Someone know how I can make it able again to program?

Thank you.

Try to boot the processor into ROM bootloader by setting the boot pins BOOT0 = 1 and BOOT1 = 0 and then resetting.

What if I cannot access directly the pin? The board that I’m using connected the BOOT0 pin to ground.

There is not one way to go through this via software?

You can try to hold your board in reset when starting openocd.

Then when releasing reset you got to make openocd halt the board before

the code that reconfigures the jtag pins is executed. Perhas do a reset halt just

before releasing the reset button can work.

Thank you for yours responses. By the end I could resolve by putting an HI voltage in the pin, as you had suggested before.