AnsweredAssumed Answered

cant program flash memeory

Question asked by vay.alex on Aug 13, 2011
Hi all!

sorry for my english

I have str-e912 board from Olimex with str912fw44x. Jtag: arm-usb-ocd. I use openOCD(0.5.0) with GDB

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

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.