Communication failure. [Solved]

Hey All,

You may have seen i’ve been making a few n00b posts over the last 2 weeks, but I’d like to think I’ve been making some progress. I’ve gone from no idea, to being able to load and debug sample programs in ROM, using eclipse. My current hurdle was trying to sort out a makefile for my own program, to generate the required files for the ROM debug.

So I decided to sit down for an hour last night and work on it. Plug in my hardware (Olimex LPC-P2148 via. ARM-USB-OCD), and fire up openOCD. Oh S*** :!:

> openocd-ftd2xx -f .\prj\lpc2xxx_armusbocd.cfg -l openocd.log

openocd.log:

Error:   jtag.c:1253 jtag_examine_chain(): JTAG communication failure, check connection, JTAG interface, target power etc.
Error:   jtag.c:1440 jtag_init(): trying to validate configured JTAG chain anyway...
Error:   jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:   jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:   jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:   jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:   jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:   jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:   jtag.c:1448 jtag_init(): Could not validate JTAG chain, exit

Well… As far as I can tell that means I’m boned. My hardware isn’t responding and I have my Uni project due next week, and no funding (or time) to buy more hardware. :cry:

Just hoping that someone could give me something more of a suggestion other than openOCD’s “Make sure you have it plugged in.” Only thing I can visibly notice is that when I try and run it the LED on the ARM-USB-OCD turns from green to green+red. Any idea’s on how I could test whether it is the ARM-USB-OCD or the board itself… bearing in mind I don’t have access to a wiggler etc?

Perhaps I could throw togeher a wiggler… sounds more viable than forking out AU$100+ for a new ARM-USB-OCD.

Suggestions appreciated :frowning:

Cheers,

Shaneo.

insane:
Hey All,

You may have seen i’ve been making a few n00b posts over the last 2 weeks, but I’d like to think I’ve been making some progress. I’ve gone from no idea, to being able to load and debug sample programs in ROM, using eclipse. My current hurdle was trying to sort out a makefile for my own program, to generate the required files for the ROM debug.

So I decided to sit down for an hour last night and work on it. Plug in my hardware (Olimex LPC-P2148 via. ARM-USB-OCD), and fire up openOCD. Oh S*** :!:

> openocd-ftd2xx -f .\prj\lpc2xxx_armusbocd.cfg -l openocd.log

openocd.log:

Error:   jtag.c:1253 jtag_examine_chain(): JTAG communication failure, check connection, JTAG interface, target power etc.

Error: jtag.c:1440 jtag_init(): trying to validate configured JTAG chain anyway…
Error: jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1448 jtag_init(): Could not validate JTAG chain, exit




Well... As far as I can tell that means I'm boned. My hardware isn't responding and I have my Uni project due next week, and no funding (or time) to buy more hardware. :cry: 



Just hoping that someone could give me something more of a suggestion other than openOCD's "Make sure you have it plugged in." Only thing I can visibly notice is that when I try and run it the LED on the ARM-USB-OCD turns from green to green+red. Any idea's on how I could test whether it is the ARM-USB-OCD or the board itself... bearing in mind I don't have access to a wiggler etc?



Perhaps I could throw togeher a wiggler... sounds more viable than forking out AU$100+ for a new ARM-USB-OCD.



Suggestions appreciated :( 



Cheers,

Shaneo.

That can be one of the more difficult problems to solve, since the failure could be anywhere in the communication chain from the PC to the micro. The only error message that is useful is the first one, since the communication failure caused all the other error messages. I have one of the ARM-USB-OCD devices and it has been very reliable, so I would not think that it is the more likely cause of your problem. The most likely cause, if you have not used JTAG on your LPC-P2148 before now, is that you do not have the DBG_E jumper installed. If that is installed, then you would need to ensure that your PC end driver software is OK, that your Open_OCD config script is OK, that your other board jumpers and switches are correctly set, and that whatever software is currently on the LPC-P2148 board is not disabling the JTAG port.

–Dave

I don’t think your hardware is broken, it’s rather a configuration setting or something in the code currently running on the ARM.

Try entering the LPC2148 internal bootloader. The DIP switch should allow you to select bootloader mode and to connect the RTS line (or some other modem line, don’t remember exactly) to the reset line. With that setup the Philips serial flash utility should be able to contact the bootloader.

When you’re at that point, the OpenOCD should be able to contact your board again.

Also, make sure that your JTAG frequency isn’t too high - try a large jtag_speed value to be sure.

Regards,

Dominic

Cheers Dave and Dominic,

Thanks for getting back to me. Dave, that was the most frustrating thing about it, when I was talking about all the progress I’d been making, that was on my board and using openOCD, and it was all working fine. None of the hardware or config files had changed, it just stopped working.

Dominic, I had actually managed to get it all working again yesterday, while playing around with the Philips flash utility (which I hadn’t used before). But I had no idea why what I had done worked, but I think your suggestion has gone a way to explaining why everything is working again.

Thanks again for the help.

-Shaneo.