Hi Uwe.

On Tue, 13 Jan 2015 17:28:55 +0100, Uwe Bonnes wrote:
> It seems that openocd can't put an empty device into halt.

My STM32F427 gets halted OK, otherwise I would not be able to issue a 'reg' 
command.
Have you tried running OpenOCD as server and then telnet into it ?
I believe that you might be experiencing the missing 'unlock sequence' problem, 
so that your FLASH_OPTCR may contain 0x00aaaae1 instead of 0x0fffaaed.

Try ...
in window #1:
$ openocd -f board/stm32f4discovery.cfg

in window #2:
$ telnet localhost 4444

# first try dumping the first 16 FLASH registers:
> mdw 0x40023c00 16

# then have a look at the FLASH_OPTCR register:
> mdw 0x40023C14; mdw 0x40023C10
0x40023c14: 00aaaae1 
0x40023c10: 00000000 

# If the FLASH_OPTCR register contains 0x00aaaae1 like above, then you need to 
unprotect your Flash-memory, this can be done using the following sequence:
> mww 0x40023C08 0x08192A3B; mww 0x40023C08 0x4C5D6E7F; mww 0x40023C14 
> 0x0fffaaed; mdw 0x40023C10
0x40023c10: 00000000 

# Finally, check the new register contents:
> mdw 0x40023C14; mdw 0x40023C10
0x40023c14: 0fffaaed 
0x40023c10: 00000000 

# and exit OpenOCD
> shutdown

It should now be possible to program your device.


Love
Jens

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to