Hello, 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. Regards, Mathias On 01.05.2012 18:56, Gerd v. Egidy wrote: > Hi, > > I've seen that Spencer did some patches for stlink. Since I still got > problems > with stlink and openocd I tried them out: > > I took git master from today (ee38fff78bf) and added the following patches: > http://openocd.zylin.com/604 > http://openocd.zylin.com/605 > http://openocd.zylin.com/606 > http://openocd.zylin.com/607 > http://openocd.zylin.com/608 > > I tried to connect to my STM32F4DISCOVERY with the following command: > openocd -f interface/stlink-v2.cfg -f target/stm32f4x_stlink.cfg -c init -c > "reset halt" > > Openocd fails to correctly connect with the cpu. > > This worked with an older version (git b6068f5a48), although connecting with > just "reset" or without reset at all didn't work. > > The log of one run with --debug 3 is attached. The failure is a bit different > each time, e.g. detecting the correct cpu fails in different ways, I've seen > these variants: > > Debug: 164 10 target.c:1908 target_read_u32(): address: 0xe000ed00, value: > 0x00000000 > Debug: 165 10 cortex_m.c:1799 cortex_m3_examine(): Cortex-M0 r0p0 processor > detected > Debug: 166 10 cortex_m.c:1800 cortex_m3_examine(): cpuid: 0x00000000 > > > Debug: 164 9 target.c:1908 target_read_u32(): address: 0xe000ed00, value: > 0x410fc241 > Debug: 165 9 cortex_m.c:1799 cortex_m3_examine(): Cortex-M4 r0p1 processor > detected > Debug: 166 9 cortex_m.c:1800 cortex_m3_examine(): cpuid: 0x410fc241 > > > Debug: 164 9 target.c:1908 target_read_u32(): address: 0xe000ed00, value: > 0x410f0014 > Debug: 165 9 cortex_m.c:1799 cortex_m3_examine(): Cortex-M1 r0p4 processor > detected > Debug: 166 9 cortex_m.c:1800 cortex_m3_examine(): cpuid: 0x410f0014 > > To me it seems like the communication of the ST-Link with the CPU is somehow > broken. I use Fedora 15 on x86_64. The hardware seems to be fine, same > board/cable/port works under Windows with the utility from STM. > > 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