# Open ocd USB Tiny error.

**URL:** <https://community.sparkfun.com/t/open-ocd-usb-tiny-error/4436>\
**Category:** MicroMod\
**Tags:** arm-lpc\
**Created:** [May 18, 2007, 3:24pm UTC](https://community.sparkfun.com/t/open-ocd-usb-tiny-error/4436 "2007-05-18T15:24:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JD](https://avatars.discourse-cdn.com/v4/letter/j/bc79bd/32.png) [@JD](https://community.sparkfun.com/u/JD)\
**Post date:** [May 18, 2007, 3:24pm UTC](https://community.sparkfun.com/t/open-ocd-usb-tiny-error/4436/1 "2007-05-18T15:24:26Z")

</div>

I deleted my post in the arm/lpc forum as i think this is more appropriate here.

I just purchased an olimex open OCD USB tiny programmer and can’t get it to work. I have tired going through the tutorial on the YAGARTO website and updated to the most recent version of open OCD and now I get the following errors:

```auto
Info: openocd.c:86 main(): Open On-Chip Debugger (2007-04-16 19:30 CEST)
Error: embeddedice.c:181 embeddedice_build_reg_cache(): unknown EmbeddedICE version (comms ctrl: 0x00000000)
Error: armv4_5.c:186 armv4_5_mode_to_number(): invalid mode value encountered
Error: arm7_9_common.c:1019 arm7_9_debug_entry(): cpsr contains invalid mode value - communication failure
Error: target.c:1137 handle_target(): couldn't poll target, exiting

```

The first error is new now that I updated open ocd. The second and third error I had with the ocd version that came with the programmer. The third error mentions the CSPR register, does this at least mean that I am communications with the microcontroller?

Sometimes I get the error:

```auto
Info: openocd.c:86 main(): Open On-Chip Debugger (2007-04-16 19:30 CEST)
Error: ft2232.c:1287 ft2232_init_ftd2xx(): unable to open ftdi device: 2
Error: ft2232.c:1302 ft2232_init_ftd2xx(): ListDevices: 2

Error: ft2232.c:1304 ft2232_init_ftd2xx(): 0: Olimex OpenOCD JTAG TINY B
Error: ft2232.c:1304 ft2232_init_ftd2xx(): 1: xW?

```

To fix this I have tried playing with the configuration file by changing the ‘ft2232\_device\_desc’ to “Olimex OpenOCD JTAG TINY B”

Running ocd with this change to the .cfg looks like it works until I hit resume and I get a GDB popup that says “Execution suspended because of error” detail “The program is not being run.”

My .cfg for the “A” version is below:

```auto
#daemon configuration
telnet_port 4444
gdb_port 3333

#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG TINY A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0004
jtag_speed 1

#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst separate

#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe

#target configuration
daemon_startup reset

#target <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
run_and_halt_time 0 30

#target_script 0 reset oocd_flash2138.script
working_area 0 0x40000000 0x40000 nobackup

#flash configuration
flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum

# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger

```

I have also tried different jtag speeds with no success.

I am trying to debug/program a LPC2138 on a OLIMEX development board.

Any help to point me in the right direction would be greatly appreciated.

Regards,

JD

[/code]

---

<div class="post-metadata">

**Author:** ![JD](https://avatars.discourse-cdn.com/v4/letter/j/bc79bd/32.png) [@JD](https://community.sparkfun.com/u/JD)\
**Post date:** [May 18, 2007, 4:31pm UTC](https://community.sparkfun.com/t/open-ocd-usb-tiny-error/4436/2 "2007-05-18T16:31:19Z")

</div>

sorry all. I think i have the debugger working with a jtag speed of 10. I need to do some more resarch to see what this means.

Thank you.

---

<div class="post-metadata">

**Author:** ![busonerd](https://avatars.discourse-cdn.com/v4/letter/b/958977/32.png) [@busonerd](https://community.sparkfun.com/u/busonerd)\
**Post date:** [May 18, 2007, 4:44pm UTC](https://community.sparkfun.com/t/open-ocd-usb-tiny-error/4436/3 "2007-05-18T16:44:44Z")

</div>

Basically what this means is your jtag clock was too fast for your target.

The jtag clock needs to be a multiple slower than the core clock [unfortunatly, I don’t remember what that multiple is].

I usually have the jtag\_clock slow until I initialize the PLLs.

Cheers,

–David Carne
