AnsweredAssumed Answered

st link 20-pin jtag to 10 pin swd, can't halt the core

Question asked by slinko.natali on Jan 28, 2013
Hello  everyone.
I need to connect, programm and debug project on one board with 10 pin swd.
1. vcc +3 V
2. tms_swdio (pulled up to +3V throught 5.1 kOhm resistor)
3. gnd
4. tck_swclk  (pulled up to +3V throught  5.1 kOhm resistor)
5. gnd
6. tdo_swo (pulled up to +3V throught  5.1 kOhm resistor)
7.gnd
8.tdi (pulled up to +3V throught 5.1 kOhm resistor)
9.gnd
10. rst

I've made ribbon cable-adapter from 20 pin jtag from st-link to 10 pin swd. The pin map is:

jtag                    swd
1. vcc                       1. vcc
 7.tmsswdio              2.tms_swdio
20. gnd                     3. gnd
9. swclk                    4. swclk
8. gnd                       5. gnd
13. tdo_swo             6. tdo_swo
                    7. nc
5. tdi                         8. tdi
11.gnd                       9. gnd
15. reset                    10. reset(NRST pin of MCU)
the 3, 5, 7,9 pins of swd are connected to the ground.
When i'm trying to connect to the target using keil or st-link I get message "Can't halt the core". Sometimes I can connect to the target using st link utility target->automatic mode. When I run it in loop at the third, as a rule, time I connect to the device. Then I disconnect and try to connect to it by Target->Connect. But when I try to programm it I get the error "Internal command error". When I try to check the option bits sometimes all pages are Write protected. I try to unprotect them but get the message Can't configure the option bits. But when I connect to the terget the next time I see that they are unprotected. And in keil i always get message Can't halt the core. 
What does it mean and what is the reason of this problem? is my ribbon cable right? or maybe something wrong in connection from jtag to swd? help me please, I cant solve this problem at about 1 week!  
p.s. the target is stm32f103ze
st-link utility version is 2.4.0
st link usb driver version 4.2.3.0
st link_CLI 1.4.0
st link version 1.

Outcomes