Can't halt the core

Hi all!

I have str-e912 board from Olimex with str912fw44x. Jtag: arm-usb-ocd. I use openocd(0.4.0) with GDB. When i’m trying to halt the core, i’m getting this message:

soft_reset_halt
requesting target halt and executing a soft reset
Error: Failed to halt CPU after 1 sec
Info : Halt timed out, wake up GDB.

Neither ‘halt’ nor ‘soft_reset_halt’ doesnt work. Without halting core there is no chance to write to internal flash memory. Are there other ways to halt?

I think that problem is in core state, but to change it, i should write to cpsr. I found command arm7_9 write_xpsr. But…

(gdb) monitor arm7_9 write_xpsr 0x13 0
arm7_9 write_xpsr 0x13 0: command requires more arguments
in procedure 'arm7_9' called at file "command.c", line 650
called at file "command.c", line 361
(gdb)

What arguments it asks?in the [specification i found no more. How i should use it?

There was mad idia to write directly to internal ram(becouse flash is unwritable ) and change cpsr with spicial asm coomands, but arm starts from 0x00.

gdb in terminal

http://storage3.static.itmages.ru/i/11/ … 3eaf6.jpeg](http://elk.informatik.fh-augsburg.de/pub/openocd-quickref/old/oocd-quickref-211.pdf)

I solved it by adding jtag_reset 0 1 in commands to processor

Hi all!

when i’m trying to turn off protection on my str9

monitor flash protect 0 0 7 off
cleared protection for sectors 0 through 7 on flash bank 0

how you can see, its all right, but then if i type command to get protection status

monitor flash info 0
#0 : str9x at 0x00000000, size 0x00080000, buswidth 0, chipwidth 0
# 0: 0x00000000 (0x10000 64kB) protected
# 1: 0x00010000 (0x10000 64kB) protected
# 2: 0x00020000 (0x10000 64kB) protected
# 3: 0x00030000 (0x10000 64kB) protected
# 4: 0x00040000 (0x10000 64kB) protected
# 5: 0x00050000 (0x10000 64kB) protected
# 6: 0x00060000 (0x10000 64kB) protected
# 7: 0x00070000 (0x10000 64kB) protected
str9x flash driver info

nothing change. Why?i know, that there are two protection level registers in str9, but i can’t clear them via jtag, because in the documentation (flash programming manual) i failed to find it’s address.

Another example: below i’m trying to load hex file with gdb:

(gdb) load
Loading section .dynamic, size 0x88 lma 0x4000000
Loading section .got.plt, size 0xc lma 0x4000088
Error erasing flash with vFlashErase packet
(gdb)

this command includes erasing of flash memory, then i try to erase flash:

(gdb) monitor flash erase_sector 0 0 7
error erasing flash bank, status: 0xff
failed erasing sectors 0 to 7

Any ideas?

All this problems started when i have uncommented in 91x_config.h of ARM Firmware library from ST, source which is responsible for booting form 1 bank, while i load the program in flash bank 0 by gdb . Then there was a problem with halting the processor, but i solved it. And now problem, i’ve described, occurs.