Hi Mathias,

> i think it's a initializing problem of the cpu and not a communication
> problem. The TAPID is correct received from STLINK but all memory read
> fails.
> 
> Is the problem is gone if you press the on-board reset button?
> Is your firmware always crash? If so try to hold the reset button and
> reconnect.

I think now we are getting somewhere! Thanks a lot for your hint. I did some 
test and these are the results:

- my firmware on stm32f4, openocd, "reset_config srst_only", started with 
"reset" or "reset halt" -> read errors
- my firmware on stm32f4, openocd, "reset_config srst_only srst_nogate", 
started 
with "reset" or "reset halt" -> read errors
- my firmware on stm32f4, openocd, "reset_config srst_only", started with 
"reset" or "reset halt", hardware reset button helt down during start of 
openocd, then released after openocd is initialized -> working
- my firmware on stm32f4, stlink utility on windows -> working
- default demo firmware on stm32f4, openocd, "reset_config srst_only", started 
with "reset" or "reset halt" -> working

So I conclude there are two problems at play:

- the firmware on the stm32f4 has to "play well" with swd. Maybe some kind of 
initialisation is needed that I'm missing.

- there is some special initialisation procedure to make it work even with 
"non-behaving" firmware on the mcu. The utility from stm does it correctly, but 
current openocd (=git head + patches from gerrit) not. "reset_config srst_only 
srst_nogate" is not enough. Maybe there are timing restrictions in the 
initialisation or reset procedure we have to adhere?

When I speak of "my firmware" this is not written by me, but the NuttX RTOS 
(http://nuttx.sourceforge.net/) with it's nsh example compiled for the f4 
discovery. The firmware does not crash but work as expected. It is offering a 
small shell on USART2.

Kind regards,

Gerd

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to