Author Topic: AVR JTAG ICE USB Dongle  (Read 1484 times)

0 Members and 1 Guest are viewing this topic.

Offline NjkTopic starter

  • Regular Contributor
  • *
  • Posts: 203
  • Country: ru
AVR JTAG ICE USB Dongle
« on: December 23, 2023, 03:37:29 pm »
Bought a cheap clone of Atmel AVR ICE to read the firmware from ATmega32 device. It's one-time work but it's too risky to use a stuff of that sort without careful inspection. So I did it. The findings (with the hope it will be useful to someone).

- Self-powered from a USB host. Declares current consumption of 98 mA.
- Supplies a target board with 5V DC power voltage via VTref JTAG pin. Has internal PTC fuse (500 mA?) for the USB port protection.
- Can be configured to work with a 5V self-powered target boards.
- A pure 5V solution. Does not measure the power voltage of target board (VTref), does not implement voltage level translation.
- No-name design style. The logic gate inputs are left floating, useless pull-ups, etc.
- Uses the original Atmel JTAG ICE firmware that can be upgraded with AVR Studio.
- Supported by Atmel AVR Studio v.4.x or older. Not compatible with AVR Studio v.5.x or later.

Usage

1. Install the driver for WCH CH340/341 USB to Serial bridge using the Windows system software on-line update facility and make sure the device is recognized by the PC as a "USB-Serial CH340" COM port. It's advised to keep the COM port number within the range of 1-4. Then disconnect the device from the PC.

2. Install Atmel AVR Studio IDE of version not greater than 4.19 (during the installation, the Jung drivers component of AVR Studio may be excluded as it's not necessary).

3. Start AVR Studio and then plug the device to a USB host port of the PC. When plugged in, the device work in the boot mode waiting for firmware upgrade for about 5 s. The red and blue LEDs on the device both are fast blinking to indicate boot mode. During that time, the device can't be used as AVR JTAG ICE but it can be programmed with a new firmware. If the programming is not required, just wait for 5 s and the device will be ready to use.

4. To program the device with the Atmel firmware, invoke the AVR programmer window in AVR Studio (Tools->AVR Prog...) at the time when both the LEDs on the device are blinking. The AVRprog window will appear in few seconds, the red LED on the device will turn off and the blue LED will start shining steady to indicate the programmer connection.

5. With the programmer window, select <AVR Studio inst path>\Atmel\AVR Tools\JTAGICE\Upgrade.ebn ciphered firmware hex file and press Program button to program the file to the Flash ROM of the device (do not program the EEPROM with that file). Watch the progress bar and wait for the completion. During that time, both LEDs on the device initially are shining steady (the erasing and programming phases) then only the blue LED becomes lit (the verification phase), and when the operation has finished, the blue LED turns off and the red LED turns on. In that state, the connection between the device and the programmer still exists so it's possible to program the Flash ROM again, if desired. It's also possible to read back the Flash ROM and EEPROM in a file.

6. Press Exit button in the AVR programmer window and dismiss the window. The connection will be torn down and the device will switch to the boot mode again (the red and blue LEDs will start blinking). During that time, it's possible to repeat the FW update procedure starting from the step 4, if desired.

7. In about 5 s, the device switches to the JTAG ICE mode. The red LED on the device turns off and the blue LED starts shining steady to indicate the readiness. From that time, the device can be used.

8. To use the device, connect it to the target board, power it on, and initiate a debugging session with AVR Studio (select the JTAG ICE platform) or avrdude (select the jtagmkI device).

Note: If at the step 4 the device is not found by the AVR Programmer (error message has popped-up), check that the COM port number allocated to the device is within the range of 1-4.

If it's not desired to power the target board by the dongle, take the device apart and de-solder the PTC fuse on the PCB.

The wiring diagram and PCB images are attached.
 

Offline johntitor

  • Newbie
  • Posts: 3
  • Country: us
Re: AVR JTAG ICE USB Dongle
« Reply #1 on: December 30, 2023, 01:53:33 pm »
Thanks for this. I have a similar one and couldn't get it to show up as COM in device manager (had to install the driver). On another note, it seem that these clones do not work on Windows 11 (You have to use AVR Studio 4.18 or older).
« Last Edit: December 30, 2023, 11:44:02 pm by johntitor »
 

Offline NjkTopic starter

  • Regular Contributor
  • *
  • Posts: 203
  • Country: ru
Re: AVR JTAG ICE USB Dongle
« Reply #2 on: January 01, 2024, 09:12:08 pm »
I have a similar one and couldn't get it to show up as COM in device manager (had to install the driver).
Perhaps you're not lucky. It seems the dongles are manufactured in many different places in an absolutely unsupervised way, demonstrating that a cockroach-style competition can be ugly like a monopoly. Who knows how many of them are actually working correctly.

Edit: BTW, from the USB development times, I do remember that in Windows, it's easy to derail the automatic driver binding when a bad experience with the device is memorized in the system registry. In that cases, manual cleanup is the only solution. My personal choice is to don't contaminate my computers with a problematic and sub-standard system SW (e.g. zadig drivers), but some folks still using it so the variety of consequences can be really wide.
« Last Edit: January 03, 2024, 05:05:34 am by Njk »
 

Offline johntitor

  • Newbie
  • Posts: 3
  • Country: us
Re: AVR JTAG ICE USB Dongle
« Reply #3 on: January 08, 2024, 01:36:19 am »
Yes, it seems like they are incredibly cheaply made, but the I guess the real Atmel ones are too expensive for my school's lab so all they have are clones.

In that cases, manual cleanup is the only solution. My personal choice is to don't contaminate my computers with a problematic and sub-standard system SW (e.g. zadig drivers), but some folks still using it so the variety of consequences can be really wide.

In the end, this was the issue. I had "debloated" windows and somehow forced windows to not download any drivers, so I had to manually download it.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf