AVR ICE-Cube - Technical Details
This page presents the technical details of the ECROS Technology AVR ICE-Cube JTAG interface. You do not need to understand this information to use the ICE-Cube, but it may help you chose the right JTAG ICE interface for your needs and gain the most benefit from it. Experiences with a rather poor quality JTAG ICE are included to illustrate the importance of good design. These paragraphs are set off in boxes so you can skip them if they do not interest you.
|Specification Item||AVR ICE-Cube||Atmel JTAG ICE||Brand X|
|Self-powered||no||yes, 9 to 15 V|
|Target voltage range, self powered||n/a||1.8 to 6 volts|
|Target-powered (pin 7 of header)||yes||yes|
|Voltage range, target powered||3 to 5.5 volts||3.3 to 5.5 volts|
|Current draw, target powered||12 to 25 mA †||220 to 120 mA †|
|Source of operating software||AVR Studio||AVR Studio|
|Automatic version update||yes||yes|
|Manual version change||yes||yes ‡|
|Target system voltage measurement||yes, ± 5%||yes (± ???)|
|Supported devices||ATmega16,162,169,32,323,64,128, etc.|
|LED indicators||Power, Activity||Tgt p., ICE p., Actv.|
|Bench space required||none||20 sq. in.|
|Weight||2 oz, incl. cable||8 oz estimated|
|Available accessories||STK500 Adapter|
† The AVR ICE-Cube draws 13 mA from the target at 3.3 volts and 22 mA at 5V. The Atmel JTAG ICE uses an up-converter when target powered. This is why current draw is greater (220 mA) at the lower target voltage of 3.3 volts.
‡ Atmel state in the JTAG ICE User's Guide that the manual firmware upgrade "should work" in all cases. This feature of the AVR ICE-Cube is fully tested and is guaranteed to work.
JTAG In-Circuit Emulation (ICE) in Atmel AVR microcontrollers consists of three parts:
- special On-Chip Debug (OCD) circuitry inside the chip, connected to the JTAG port
- debugging software in AVR Studio (or some other program running on a host system such as a PC)
- an interface circuit that lets the debugging software talk to the OCD circuitry in the chip using the JTAG port
Atmel's JTAG ICE is the "reference" implementation of this JTAG interface circuit. The JTAG ICE User Guide provides excellent information about the OCD concept.
A JTAG ICE interface consists basically of an Atmel microcontroller with a serial interface to the PC running AVR Studio. The AVR Studio debugger sends commands to the JTAG ICE, which reformats them and applies them to the target system microcontroller's JTAG pins. Responses from the target are reformatted and passed back to the debugger.
The software that runs in the JTAG ICE and performs this reformatting between RS232 and JTAG is supplied along with AVR Studio. The JTAG ICE is programmed with this software using a built-in flash loader (sometimes incorrectly called a "boot loader") and Atmel's AVR Prog utility, also supplied with AVR Studio. AVR Studio checks that the software in the JTAG ICE is of the correct version and, if necessary, offers to upgrade it by automatically starting AVR Prog. If the flash loader has been properly designed, this will also be started ready to receive the new software.
The fact that Atmel supply the software for a JTAG ICE in a freely distributable package allows other JTAG ICE interfaces to be produced at lower prices (and generally smaller feature sets) than Atmel's unit. By using the Atmel software, such a "clone" JTAG ICE can be assured to operate in basically the same way as the reference. However, there is more to a JTAG ICE than the Atmel software and non-Atmel products are differentiated by how well they are designed to handle such issues as EMI, power supply isolation, convenience of software loading, etc. Sections below discuss these issues to help you make an informed decision about which JTAG ICE interface is for you.
The reliable operation of any piece of electronic equipment depends on the proper design of the printed circuit board. It is not sufficient to simply connect up components according to the schematic. Today's fast-switching ICs require attention to the path taken by signals travelling from place to place both in the out-going direction and the return direction, back to ground at the signal source. Unfortunately, some inexperienced designers are unaware of or ignore these issues, particularly ground return paths. As a result, the equipment works in some environments, but becomes "flaky" in others. The "loops" of badly-placed PCB traces pick up electromagnetic interference (EMI or "noise") from things like refrigerators and vehicles. These loops can also emit EMI, making other equipment, including the target system, misbehave.
The ECROS Technology AVR ICE-Cube uses a partial ground plane design for ground returns. This is not as good as a complete ground plane, but better than a grid and certainly better than normal point-to-point routing. For the MCU on the adapter, which runs at less than 10 MHz, a partial ground plane is completely adequate and avoids the cost of a four-layer PCB. The picture at right (click for a larger version) shows that most of the PCB is covered with ground plane on one side or the other. This helps signals find a return path close to the out-going path or, where there is a gap in the ground plane, divide into multiple paths in opposite directions that cancel EMI.
JTAG ICE interfaces that draw power from the target system have a more limited operating voltage range than those with their own power supplies. This is because the target supply has to be high enough for the adapter circuits to work, including the MCU and RS232 level converter.
The ECROS Technology AVR ICE-Cube uses components that guarantee operation from 3V to 5.5V. The current drawn from the target system varies from 12 to 25 mA over this range. For Atmel MCUs with very low supply voltages or systems that cannot supply this current, an adapter with its own power supply and level shifters is necessary.
The ECROS Technology AVR ICE-Cube draws its operating power from the target system on pin 7 of the connector. This is in accordance with Atmel's intent. A target system that is able to supply power connects this pin to a suitable supply. A target system that has no power to spare, such as the AVR Butterfly, leaves this pin unconnected.
Just as a poorly designed PCB can lead to "flaky" operation, noise coupled from the target system to the JTAG ICE interface can cause problems if the target system produces a lot of noise. Noise coupled in the other direction can cause problems when the target system is sensitive to noise. Note that most, if not all, JTAG ICE interfaces include an RS232 level converter which has a charge-pump power supply - a classic producer of noise.
The ECROS Technology AVR ICE-Cube isolates adapter power and target power with a 330 µH inductor. Four ceramic capacitors are used for supply decoupling, 0.1 µF between each VCC pin of the adapter MCU and the power trace plus 0.47 µF at the RS232 level converter. A space for a B-size tantalum electrolytic capacitor is included on the PCB This has been found to be unnecessary but can be added if desired. This design virtually eliminates the coupling of power supply noise between the ICE interface unit and the target system.
For more information on both PCB layout and supply decoupling issues, refer to Atmel Application Note AVR040: EMC Design Considerations.
An essential function of the JTAG ICE interface is the flash loader, which enables the software to be loaded from AVR Studio. It does not affect the use of the adapter during debugging, but can affect the convenience with which the software is initially loaded and updated.
The ECROS Technology AVR ICE-Cube includes a flash loader that is immediately active when you first apply power. When you load the software using AVR Prog, verification works properly. The adapter is then immediately ready for use, without even cycling power. If AVR Studio needs to update the software, the flash loader is activated automatically. If needed, the flash loader can also be activated by turning on power while a pad on the circuit board is shorted to ground. This takes no longer than the time to find a paperclip or small screwdriver. Once the flash loader is active, any version of the Atmel software can be loaded in less than a minute.
The Atmel JTAG ICE has a few "ancillary" functions not fundamental to loading and debugging software. One of the most useful is the ability to measure and display the target system voltage.
The ECROS Technology AVR ICE-Cube adapter reports the actual target system voltage to an accuracy of better than 5%. High voltages are slightly underestimated (5.0 V reads as 4.9) and low voltages are overestimated (3.3 V reads as 3.4), but you can certainly check that the target power supply is working properly. AVR Studio can also detect loss of target power if you arrange for the AVR ICE-Cube to have its own power source.
Packaging is not really a technical issue, but has been included here for completeness. What type of packaging you choose for your adapter will be a matter of personal preference and the way that your work area is set out.
The ECROS Technology AVR ICE-Cube is unique in that it does not sit on the bench but is held above the target system, "perching" on the 10-pin connector. It therefore takes up no bench space. The lighter cable to the hosting PC has less tendency to pull the target system around. As with many other aspects of the ECROS Technology JTAG interface design, this improves EMI compatibility by eliminating the target system cable. The serial cable to the PC is also shielded, which may not be the case with your DB9 cable. However, perching the JTAG interface unit on the target may not be the right choice for you. A cable adapter is supplied with which you can connect the ICE-Cube to your target system using a ribbon cable, such as those supplied with the STK500. For more information, refer to Connecting to a Target System.