AVR-USB-JTAG working intermittently

I tried a AVR-USB-JTAG on a wire-wrapped Mega32 board, running at the default 1 MHz (internal oscillator). The code was written using the Image Craft C compiler. The JTAG unit was indeed recognized by AVR Studio 4, successfully programmed the Mega32, and was able to single step. But just intermittently. “Step over” or “step out” would frequently cause the debug UI to show the processor as running after a step, not halted. Hitting break would bring it back, but usually at the wrong instruction. Large portions of code were not executed. Always using “step in” seemed to work, but that gets old real quick. It simply isn’t practical to single step through every single instruction!

I eventually switched over to an Atmel JTAG ICE mk II, which works flawlessly.

Any ideas on what the problem might be?

hi,

it may be inproper settings of ICC compiler.

Recently customer of ours reported that in Compiler Settings “AVR Studio Simulator IO” should be checked.

please try and let us know if this is your case too

Tsvetan

When I switched to the JTAG ICE MkII, I also switched to AVR Studio 4.12 RC1 (build 452). It does not seem to offer the USB as an option in the port dialog! Therefore I am not able to use the USB JTAG-ICE at all at the moment to try out your suggestion.

Once 4.12 RC1 becomes the offical release, the USB version of your JTAG ICE won’t be much good. Perhaps customers should favor the serial version.

When you install the drivers for the AVR-JTAG-USB, it creates a vitual COM port. In AVR Studio you don’t select USB you select the COM#.

EDIT: The JTAG-USB has a built in USB<->RS232.

I thought there were choices for both USB and COM ports in AVR Studio 4.11, but I had it on “auto” and it did connect. I cannot connect on any port with 4.12.

when you plug the USB connector and the virtual com port - check which port is your virtual port and set AVR Studio to it

if you want to make upgrade set the virtual com port to be COM1 or COM2 as AVR Studio will not upgrade on other than these ports

Hope this helps

Tsvetan