openOCD-Olimex ARM-USB-TINY-STM32-H103

Hello,

As you can see here viewtopic.php?t=14650, i had problems using Crossworks and its debugger. Now i switched sucessfully to Eclipse+openOCD to flash and debug.

First evening everything was OK, but now it doesn’t.

First here is the Log

500 kHz
Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (Manufacturer: 0x23b, Part: 0xba00, Version: 0x3)
Info : JTAG Tap/device matched
Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (Manufacturer: 0x020, Part: 0x6410, Version: 0x1)
Info : JTAG Tap/device matched
Warn : no telnet port specified, using default port 4444
Warn : no gdb port specified, using default port 3333
Warn : no tcl port specified, using default port 6666
Info : accepting 'gdb' connection from 0
Warn : target was in unknown state when halt was requested
Warn : acknowledgment received, but no packet pending
Info : device id = 0x20036410
Info : flash size = 128kbytes
cortex_m3 interrupt mask off
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: SWJ-DP STICKY ERROR
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: BUG: Why does this fail the first time????
Error: dcb_dhcsr 0x0, nvic_shcsr 0x0, nvic_cfsr 0x0, nvic_bfar 0x20004fdc

My GDB init

target extended-remote localhost:3333
monitor debug_level 2
monitor halt
load
monitor cortex_m3 maskisr off
thbreak main
monitor debug_level 0

My openocd config

source [find board/stm32f10x_128k_eval.cfg]
source [find interface/olimex-jtag-tiny-a.cfg]

proc  flash_image { filename } {
  # Halt CPU and flash image
  #
  reset halt
  flash write_image erase $filename

  # "reset run" doesn't work in 0.1.0..
  #
  resume

  shutdown
}

init

Log of flashing a programm

Warn : captured: 0x0f check_value: 0x01 check_mask: 0x0f
Warn : in_handler: w/o "in_value", mismatch in SIR
Error: BUG: Why does this fail the first time????
Warn : Invalid ACK in SWJDP transaction
Warn : TAP stm32.cpu:
Warn : value captured during scan didn't pass the requested check:
Warn : captured: 0x0f check_value: 0x01 check_mask: 0x0f
Warn : in_handler: w/o "in_value", mismatch in SIR
Warn : TAP stm32.cpu:
Warn : value captured during scan didn't pass the requested check:
Warn : captured: 0x0f check_value: 0x01 check_mask: 0x0f
Warn : in_handler: w/o "in_value", mismatch in SIR
Error: BUG: Why does this fail the first time????
Warn : Invalid ACK in SWJDP transaction
Warn : TAP stm32.cpu:
Warn : value captured during scan didn't pass the requested check:
Warn : captured: 0x0f check_value: 0x01 check_mask: 0x0f
Warn : in_handler: w/o "in_value", mismatch in SIR
Error: BUG: Why does this fail the first time????
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction
Warn : TAP stm32.cpu:
Warn : value captured during scan didn't pass the requested check:
Warn : captured: 0x0f check_value: 0x01 check_mask: 0x0f
Warn : in_handler: w/o "in_value", mismatch in SIR
Error: BUG: Why does this fail the first time????
Warn : Invalid ACK in SWJDP transaction
Warn : TAP stm32.cpu:
Warn : value captured during scan didn't pass the requested check:
Warn : captured: 0x0f check_value: 0x01 check_mask: 0x0f
Warn : in_handler: w/o "in_value", mismatch in SIR
Error: BUG: Why does this fail the first time????
Warn : Invalid ACK in SWJDP transaction
Warn : TAP stm32.cpu:
Warn : value captured during scan didn't pass the requested check:
Warn : captured: 0x0f check_value: 0x01 check_mask: 0x0f
Warn : in_handler: w/o "in_value", mismatch in SIR
Warn : TAP stm32.cpu:
Warn : value captured during scan didn't pass the requested check:
Warn : captured: 0x0f check_value: 0x01 check_mask: 0x0f
Warn : in_handler: w/o "in_value", mismatch in SIR
Error: BUG: Why does this fail the first time????
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08001264
auto erase enabled
Info : device id = 0x20036410
Info : flash size = 128kbytes
Info : Padding image section 0 with 0 bytes
wrote 4896 byte from file main.elf in 0.967200s (4.943393 kb/s)

I think, it’s the same problem, why Crossworks hangs up.

Is this a bug in the driver, in openocd or is it a hardware problem?

Can anyone of you direct me to a solution?

Regards

Michael

Ok, now i can’t even connect.

10 kHz
Info : JTAG tap: stm32.cpu tap/device found: 0xffa00477 (Manufacturer: 0x23b, Part: 0xfa00, Version: 0xf)
Error: JTAG tap: stm32.cpu             got: 0xffa00477 (mfg: 0x23b, part: 0xfa00, ver: 0xf)
Error: JTAG tap: stm32.cpu expected 1 of 1: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
Error: trying to validate configured JTAG chain anyway...
Warn : Invalid ACK in SWJDP transaction
Warn : TAP stm32.cpu:
Warn : value captured during scan didn't pass the requested check:
Warn : captured: 0x0f check_value: 0x01 check_mask: 0x0f
Warn : in_handler: w/o "in_value", mismatch in SIR
Warn : TAP stm32.cpu:
Warn : value captured during scan didn't pass the requested check:
Warn : captured: 0x0f check_value: 0x01 check_mask: 0x0f
Warn : in_handler: w/o "in_value", mismatch in SIR
Error: BUG: Why does this fail the first time????
Warn : Invalid ACK in SWJDP transaction
Warn : Invalid ACK in SWJDP transaction
Warn : TAP stm32.cpu:
Warn : value captured during scan didn't pass the requested check:
Warn : captured: 0x0f check_value: 0x01 check_mask: 0x0f
Warn : in_handler: w/o "in_value", mismatch in SIR
Error: BUG: Why does this fail the first time????
Warn : Invalid ACK in SWJDP transaction
Warn : Block read error address 0xe000ed00, count 0x1
Warn : no telnet port specified, using default port 4444
Warn : no gdb port specified, using default port 3333
Warn : no tcl port specified, using default port 6666
Warn : TAP stm32.cpu:
Warn : value captured during scan didn't pass the requested check:
Warn : captured: 0x0f check_value: 0x01 check_mask: 0x0f
Warn : in_handler: w/o "in_value", mismatch in SIR
Warn : TAP stm32.cpu:
Warn : value captured during scan didn't pass the requested check:
Warn : captured: 0x0f check_value: 0x01 check_mask: 0x0f
Warn : in_handler: w/o "in_value", mismatch in SIR
Error: BUG: Why does this fail the first time????
Warn : Invalid ACK in SWJDP transaction
Warn : TAP stm32.cpu:
Warn : value captured during scan didn't pass the requested check:
Warn : captured: 0x0f check_value: 0x01 check_mask: 0x0f
Warn : in_handler: w/o "in_value", mismatch in SIR
Error: BUG: Why does this fail the first time????
Warn : Invalid ACK in SWJDP transaction
Warn : TAP stm32.cpu:
Warn : value captured during scan didn't pass the requested check:
Warn : captured: 0x0f check_value: 0x01 check_mask: 0x0f
Warn : in_handler: w/o "in_value", mismatch in SIR
Error: BUG: Why does this fail the first time????
Warn : Invalid ACK in SWJDP transaction

It seems it’s reading even the wrong ID :shock: maybe hardwareproblem?!