OOCD V0.x.y doesn't work with STM32 low density devices?

Hi,

I’ve tried alot to bring up my board with the OOCD and Olimex JTAG, but it doesn’t work. Can somebody explane the problem and help me to solve it?

I installed the OOCD in it works with the Olimex Dev-Board STM32-P103. It also works on my board with an medium density chip but on my new one it doesn’t work I got follow messages:

Open On-Chip Debugger 0.3.1 (2009-11-13-16:13)

$URL$

For bug reports, read

http://openocd.berlios.de/doc/doxygen/bugs.html

10 kHz

jtag_nsrst_delay: 1000

jtag_ntrst_delay: 1000

trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain

force hard breakpoints

Info : clock speed 10 kHz

Info : JTAG tap: stm32.cpu tap/device found: 0x9de00477 (mfg: 0x23b, part: 0xde00, ver: 0x9)

Warn : JTAG tap: stm32.cpu UNEXPECTED: 0x9de00477 (mfg: 0x23b, part: 0xde00, ver: 0x9)

Error: JTAG tap: stm32.cpu expected 1 of 1: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)

Warn : TAP stm32.bs does not have IDCODE

Warn : JTAG tap: stm32.bs UNEXPECTED: 0x00000000 (mfg: 0x000, part: 0x0000, ver: 0x0)

Error: JTAG tap: stm32.bs expected 1 of 5: 0x06412041 (mfg: 0x020, part: 0x6412, ver: 0x0)

Error: JTAG tap: stm32.bs expected 2 of 5: 0x06410041 (mfg: 0x020, part: 0x6410, ver: 0x0)

Error: JTAG tap: stm32.bs expected 3 of 5: 0x16410041 (mfg: 0x020, part: 0x6410, ver: 0x1)

Error: JTAG tap: stm32.bs expected 4 of 5: 0x06414041 (mfg: 0x020, part: 0x6414, ver: 0x0)

Error: JTAG tap: stm32.bs expected 5 of 5: 0x06418041 (mfg: 0x020, part: 0x6418, ver: 0x0)

Warn : Unexpected idcode after end of chain: 33 0xe2d04010

Warn : Unexpected idcode after end of chain: 65 0xc000001f

Warn : Unexpected idcode after end of chain: 97 0x8000003f

Warn : Unexpected idcode after end of chain: 129 0xc000003f

Warn : Unexpected idcode after end of chain: 161 0x8000003f

Warn : Unexpected idcode after end of chain: 193 0x8000007f

Warn : Unexpected idcode after end of chain: 225 0xc000003f

Warn : Unexpected idcode after end of chain: 257 0x8000003f

Warn : Unexpected idcode after end of chain: 289 0x8000007f

Warn : Unexpected idcode after end of chain: 321 0x8000007f

Warn : Unexpected idcode after end of chain: 353 0xc000003f

Warn : Unexpected idcode after end of chain: 385 0x8000003f

Warn : Unexpected idcode after end of chain: 417 0x8000007f

Warn : Unexpected idcode after end of chain: 449 0xc000003f

Warn : Unexpected idcode after end of chain: 481 0x8000003f

Warn : Unexpected idcode after end of chain: 513 0xc000003f

Warn : Unexpected idcode after end of chain: 545 0xc000001f

Warn : Unexpected idcode after end of chain: 577 0x8000003f

Error: double-check your JTAG setup (interface, speed, missing TAPs, …)

Info : JTAG tap: stm32.cpu tap/device found: 0x9de00477 (mfg: 0x23b, part: 0xde00, ver: 0x9)

Warn : JTAG tap: stm32.cpu UNEXPECTED: 0x9de00477 (mfg: 0x23b, part: 0xde00, ver: 0x9)

Error: JTAG tap: stm32.cpu expected 1 of 1: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)

Warn : TAP stm32.bs does not have IDCODE

Warn : JTAG tap: stm32.bs UNEXPECTED: 0x00000000 (mfg: 0x000, part: 0x0000, ver: 0x0)

Error: JTAG tap: stm32.bs expected 1 of 5: 0x06412041 (mfg: 0x020, part: 0x6412, ver: 0x0)

Error: JTAG tap: stm32.bs expected 2 of 5: 0x06410041 (mfg: 0x020, part: 0x6410, ver: 0x0)

Error: JTAG tap: stm32.bs expected 3 of 5: 0x16410041 (mfg: 0x020, part: 0x6410, ver: 0x1)

Error: JTAG tap: stm32.bs expected 4 of 5: 0x06414041 (mfg: 0x020, part: 0x6414, ver: 0x0)

Error: JTAG tap: stm32.bs expected 5 of 5: 0x06418041 (mfg: 0x020, part: 0x6418, ver: 0x0)

Warn : Unexpected idcode after end of chain: 33 0xf9642008

Warn : Unexpected idcode after end of chain: 65 0xe0000007

Warn : Unexpected idcode after end of chain: 97 0x8000001f

Warn : Unexpected idcode after end of chain: 129 0xc000003f

Warn : Unexpected idcode after end of chain: 161 0x8000003f

Warn : Unexpected idcode after end of chain: 193 0x8000007f

Warn : Unexpected idcode after end of chain: 225 0xc000003f

Warn : Unexpected idcode after end of chain: 257 0x8000003f

Warn : Unexpected idcode after end of chain: 289 0xc000003f

Warn : Unexpected idcode after end of chain: 321 0x8000003f

Warn : Unexpected idcode after end of chain: 353 0x8000007f

Warn : Unexpected idcode after end of chain: 385 0x8000007f

Warn : Unexpected idcode after end of chain: 417 0x8000007f

Warn : Unexpected idcode after end of chain: 449 0x8000007f

Warn : Unexpected idcode after end of chain: 481 0x8000007f

Warn : Unexpected idcode after end of chain: 513 0x8000007f

Warn : Unexpected idcode after end of chain: 545 0xc000003f

Warn : Unexpected idcode after end of chain: 577 0xc000001f

Error: double-check your JTAG setup (interface, speed, missing TAPs, …)

The hardware should be ok because I’ve test the connection with the Hitex JTAG, currently I switch to this tool but it is no way I want to use the OOCD.

Cheers,

Christian

Try changing the cpu tap id to 0x9de00477 and disabling the bs tap

4/3!!

Hi,

thanks for your answer.

I changed this but it doesn’t work. I think the communication fails becaus CPUTAPID change the value every time. I think 0x3ba00477 should be correct because I use a STM32.

I’ve got follow output with your modifications:

Open On-Chip Debugger 0.3.1 (2009-11-13-16:13)

$URL$

For bug reports, read

http://openocd.berlios.de/doc/doxygen/bugs.html

10 kHz

jtag_nsrst_delay: 1000

jtag_ntrst_delay: 1000

trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain

force hard breakpoints

Info : clock speed 10 kHz

Info : JTAG tap: stm32.cpu tap/device found: 0x26f00477 (mfg: 0x23b, part: 0x6f00, ver: 0x2)

Warn : JTAG tap: stm32.cpu UNEXPECTED: 0x26f00477 (mfg: 0x23b, part: 0x6f00, ver: 0x2)

Error: JTAG tap: stm32.cpu expected 1 of 1: 0x9de00477 (mfg: 0x23b, part: 0xde00, ver: 0x9)

Warn : Unexpected idcode after end of chain: 32 0xfc5a1004

Warn : Unexpected idcode after end of chain: 64 0xc0000003

Warn : Unexpected idcode after end of chain: 96 0x0000003f

Warn : Unexpected idcode after end of chain: 128 0x8000007f

Warn : Unexpected idcode after end of chain: 160 0x8000003f

Warn : Unexpected idcode after end of chain: 192 0x0000007f

Warn : Unexpected idcode after end of chain: 320 0x8000007f

Warn : Unexpected idcode after end of chain: 352 0x8000003f

Warn : Unexpected idcode after end of chain: 384 0x0000007f

Warn : Unexpected idcode after end of chain: 416 0x8000007f

Warn : Unexpected idcode after end of chain: 448 0x8000003f

Warn : Unexpected idcode after end of chain: 480 0x8000003f

Warn : Unexpected idcode after end of chain: 512 0x0000007f

Warn : Unexpected idcode after end of chain: 544 0x8000007f

Warn : Unexpected idcode after end of chain: 576 0x0000007f

Error: double-check your JTAG setup (interface, speed, missing TAPs, …)

Info : JTAG tap: stm32.cpu tap/device found: 0x4ed00477 (mfg: 0x23b, part: 0xed00, ver: 0x4)

Warn : JTAG tap: stm32.cpu UNEXPECTED: 0x4ed00477 (mfg: 0x23b, part: 0xed00, ver: 0x4)

Error: JTAG tap: stm32.cpu expected 1 of 1: 0x9de00477 (mfg: 0x23b, part: 0xde00, ver: 0x9)

Warn : Unexpected idcode after end of chain: 32 0xe2c84010

Warn : Unexpected idcode after end of chain: 64 0xc000000f

Warn : Unexpected idcode after end of chain: 96 0x0000003f

Warn : Unexpected idcode after end of chain: 128 0x8000007f

Warn : Unexpected idcode after end of chain: 160 0x0000007f

Warn : Unexpected idcode after end of chain: 192 0x8000007f

Warn : Unexpected idcode after end of chain: 224 0x0000007f

Warn : Unexpected idcode after end of chain: 416 0x8000007f

Warn : Unexpected idcode after end of chain: 448 0x0000007f

Warn : Unexpected idcode after end of chain: 512 0x8000007f

Warn : Unexpected idcode after end of chain: 544 0x0000007f

Error: double-check your JTAG setup (interface, speed, missing TAPs, …)

Thanks

Christian

Indeed that’s a bit crazy… Have you tried experimenting with the speed (jtag_khz) and reset delays? Maybe those forced hardware breakpoints make things complicated (“force hard breakpoints”)?

Try submitting the bug report to the OpenOCD’s mailing list

4/3!!

hi,

thanks for your answer, yes a tried alot with clock speed and timings … no success.

ok i will write a email as bugreport.

Cheers

Christian