November 23, 2024, 02:08:17 AM

Problem with ARM-USB-OCD

Started by saethor10, May 28, 2014, 06:37:41 PM

Previous topic - Next topic

saethor10

Hi there.
I need some help figuring out if my ARM-USB-OCD is broken and I would greatly appriciate any help with this issue.

I am using ARM-USB-OCD with eclipse IDE and LPC2148. I have been programming it for some time now and that has gone somewhat smoothly. But one mistake might have been a big one, to pin 1.18 on the lpc-2148 I accidently connected a wire that has a 24V on it to the pin. Not dwelling on the rookie mistake, I have bought a new lpc-2148 at first I was able to upload the program to the microcontroller via the ARM-USB-OCD. But now when I connect it with the ARM-USB-OCD it behaves oddly. I get an error message that looks like this.

trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain
Info : RCLK (adaptive clock speed) not supported - fallback to 500 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Command handler execution failed
Warn : jtag initialization failed; try 'jtag init' again.


And after connecting the ARM-USB-OCD to the LPC-2148 the usb light starts blinking rapidly and the motors connected to the microcontroller start moving on there own in a random manner. So I have the suspicion that the 24V to the pin might have destroyed the ARM-USB-OCD. I need some insight on what I should do to see if the ARM-USB-OCD is okey or if it might be something else.

Best Regards
A Rookie from Iceland.

LubOlimex

Hey saethor10,

The error message might mean a lot of things - like improper write command; old OpenOCD version; improper way of setting the jumpers.

It is a frequently reported error, for example check this mail exchange: http://sourceforge.net/p/openocd/mailman/message/28350182/.

As a starting point I recommend you to try a simple telnet session with the board and the help of OpenOCD. Please refer to these documents:

https://www.olimex.com/Products/ARM/JTAG/_resources/Manual_TELNET.pdf

For initial testing use a simple command like:

openocd-xxx.exe -f olimex-arm-usb-ocd.cfg -f ./target/lpc2148.cfg

It would show if connection is ok.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

saethor10

When I start up the ARM-USB-OCD. I get this normal message.

Open On-Chip Debugger 0.4.0 (2010-11-23-14:20)
Licensed under GNU GPL v2
For bug reports, read
   http://openocd.berlios.de/doc/doxygen/bugs.html
RCLK - adaptive
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain
Info : RCLK (adaptive clock speed) not supported - fallback to 500 kHz
Info : JTAG tap: lpc2148.cpu tap/device found: 0x4f1f0f0f (mfg: 0x787, part: 0xf1f0, ver: 0x4)
Info : Embedded ICE version 4
Info : lpc2148.cpu: hardware has 2 breakpoint/watchpoint units


Then I run the Zylin debbugger and get this. Error message in a pop up which says.

continue
Warning:
Cannot insert hardware breakpoint 1.
Could not insert hardware breakpoints:
You may have requested to many hardware breakpoints/watchpoints.


Which is defenatly not the case because I have not inserted any breakpoints at this time.
But more errors do accur at the same time and maybe it hints at an solution.


ftdi_write_data: usb bulk write failed
couldn't write MPSSE commands to FT2232
TRST/SRST error -104

And here are the commands I give the ARM-USB-OCD.

target remote localhost:3333;
Remote debugging using localhost:3333;
_vectors () at crt0.S:44
44   _vectors:       ldr     PC, Reset_Addr
monitor reset halt;
monitor wait_halt;
monitor sleep 100;
monitor poll;
monitor flash probe 0;
monitor flash write_image erase unlock "C:/Controller/3Z Robot Controller/Controller/MAIN/main.bin" 0x0
monitor sleep 200;
monitor soft_reset_halt;
monitor wait_halt;
monitor poll;
thbreak main;
Function "main;" not defined.
continue
Warning:
Cannot insert hardware breakpoint 1.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.

Continuing.
Note: automatically using hardware breakpoints for read-only addresses.


Should I buy a new ARM-USB-OCD? Or is this just something in the configuration, which I havent changed since I started and I have many times uploaded my code to the microcontroller, but now it does not work.




LubOlimex

Hey saethor10,

Try this:

target remote localhost:3333
monitor reset halt
load

By the way I recommend you to switch to newer OpenOCD version. The latest official release is 0.8.0

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex