0% found this document useful (0 votes)
148 views5 pages

Connecting To A Target Board With The Avr Jtagice Mkii: Microcontrollers

Uploaded by

Ali Barakat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
148 views5 pages

Connecting To A Target Board With The Avr Jtagice Mkii: Microcontrollers

Uploaded by

Ali Barakat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Connecting to a target board with the

AVR JTAGICE mkII

8-bit
Introduction
Microcontrollers
JTAGICE mkII is Atmel’s on-chip debugging tool for the AVR® microcontroller family.
The JTAGICE mkII supports debugging with AVR’s traditional JTAG interface and with
the debugWIRE interface. The JTAGICE mkII supports PC communication via RS-232
and USB.
JTAGICE mkII
The JTAGICE mkII is supported by AVR Studio version 4.09 and later. Quick Start
Connecting to target through the debugWIRE interface Guide
The debugWIRE interface uses only one pin, the RESET pin, for communication with
the target. To enable the debugWIRE interface on an AVR Device, the debugWIRE
Enable fuse, DWEN, must be programmed (DWEN=0).
AVR devices with debugWIRE interface are shipped with the DWEN fuse unpro-
grammed. ISP or High-Voltage Programming is required to enable debugWIRE.
Programming the fuse via ISP requires an ISP header on the target board. Using the
6-pin ISP header as shown in Figure 1 is recommended.
The JTAGICE mkII supports ISP as a general programming interface, as well as hav-
ing built in support for handling the DWEN fuse and performing the Chip Erase when
debugging. ISP is also supported by Atmel’s STK500 and AVRISP mkII. See the rele-
vant user guides for more information. All user guides are found in the AVR Studio On-
line help.
The recommended connection when the JTAGICE mkII is used for both debugWIRE
and limited ISP, is the ISP6PIN header. See Figure 1, Figure 2 on page 2 and Table 1
on page 2.
Note: When the DWEN fuse is set, the ISP interface is disabled. This is because the debug-
WIRE must have full control over the RESET pin.

Figure 1. ISP6PIN header pinout

1 2
MISO VCC
SCK MOSI
RESET GND

ISP6PIN

2562C–AVR–07/06
The connection between the JTAGICE mkII probe and the 6-pin header on the target is
described in Table 1.

Table 1. Connections required for ISP and debugWIRE


JTAGICE mkII probe ISP6PIN header ISP debugWIRE
Pin 1 (TCK) Pin 3 SCK x

Pin 2 (GND) Pin 6 GND x x

Pin 3 (TDO) Pin 1 MISO x

Pin 4 (VTref) Pin 2 VCC x x

Pin 6 (nSRST) Pin 5 RESET x x

Pin 9 (TDI) Pin 4 MOSI x

Once the DWEN fuse is programmed by ISP, there is only need for the GND, VTref, and
RESET lines when using the debugWIRE interface, thus the JTAGICE mkII will set lines
TCK, TDO and TDI to high impedance. The user can choose whether to disconnect the
three unused lines.
Note: Some precautions regarding the RESET line should be taken to ensure proper communi-
cation via the debugWIRE interface. Pull-up resistors on the RESET line must not be
smaller than 10KΩ (the pull-up resistor is not required for debugWIRE functionality), and
there should be no capacitive load (besides the one created by the line itself). Other logic
connected to the RESET line should be removed during debugging.

Figure 2. Connecting JTAGICE mkII probe to 6-pin ISP header using the squid cable

Enabling debugWIRE interface with JTAGICE mkII


Enabling the debugWIRE interface is either done via ISP or High-Voltage programming.
JTAGICE mkII supports DWEN handling via ISP only.
Connect the JTAGICE mkII to the target. When starting a debugWIRE debugging ses-
sion, the JTAGICE mkII assumes that debugWIRE is enabled. If debugWIRE is not
enabled (DWEN fuse disabled), a dialog window in AVR Studio will offer you to enable
the interface via JTAGICE mkII. Note that this requires all six pins connected as
described in Table 1. Once the DWEN fuse is programmed, only three pins are needed
for further debugging the microcontroller.

2 AVR JTAGICE mkII


2562C–AVR–07/06
AVR JTAGICE mkII

Connecting to the target through the ISP Interface


Connecting to the ISP interface is described in the section documenting the debugWIRE
connection.

Re-enabling the ISP interface


When the DWEN fuse is enabled the ISP interface is disabled in order to have full con-
trol over the RESET pin. Enabling the ISP interface again will disable the debugWIRE
interface:
1. Connect the JTAGICE mkII to the target ISP header.
2. From within a debug session, open "JTAGICE mkII Options" found in the
“Debug”-menu in AVR Studio and select the "Connections" tab
3. Click on the button "disable debugWIRE". Now the ISP interface is enabled and
debugWIRE interface disabled.

Connecting to the target through the JTAG interface


At least 6 wires are required to connect the JTAGICE mkII to the target application.
These signals are TCK, TDO, TDI, TMS, VTref and GND.
Optional line is the nSRST. The nTRST signal is not used, and is reserved for compati-
bility with other equipment.
nSRST is used to control and monitor the target reset line - this is not necessary for cor-
rect emulation. However if the application code sets the JTD bit in the MCUCSR, the
JTAG interface will be disabled. In order for the JTAGICE mkII to be able to re-program
the target AVR, it will need to have control of the RESET Pin. Note that the nSRST line
is pulled high internally by a 10 KΩ load.
Figure 3 and Table 2 on page 4 show which JTAG lines should be connected to the tar-
get AVR to ensure correct operation. To avoid drive contention on the signal lines it is
recommended that series resistors are placed between the JTAG lines and any external
circuitry. The value of the resistor should be chosen so that the external circuitry and the
AVR do not exceed their maximum ratings (i.e. sink or source too much current).

Figure 3. JTAG10PIN connector


1 2
TCK GND
TDO VTref
TMS nSRST
(nTRST)
TDI GND

3
2562C–AVR–07/06
Table 2. JTAG Connections
Pin Signal I/O Description
1 TCK Output Test Clock, clock signal from JTAGICE mkII to target
JTAG port
2 GND - Ground
3 TDO Input Test Data Output, data signal from target JTAG port to
JTAGICE mkII
4 VTref Input Target reference voltage. Also used to power level
converter inputs.
5 TMS Output Test Mode Select, mode select signal from JTAGICE
mkII to target JTAG port
6 nSRST Out-/In-put Open collector output from adapter to the target
system reset. This pin is also an input to the adapter so
that the reset initiated on the target application board
may be reported to the JTAGICE mkII
7 - - Not connected
8 nTRST NC(Output) Not connected, reserved for compatibility with other
equipment (JTAG port reset)
9 TDI Output Test Data Input, data signal from JTAGICE mkII to
target JTAG port
10 GND - Ground

Connecting the JTAGICE mkII to AVR Studio


Before starting AVR Studio, the JTAGICE mkII must be connected between the front
end PC and the target board. All connections must be made before starting AVR Studio
to ensure correct auto-detection by AVR Studio.
The JTAGICE mkII uses a standard RS-232 port for communication. Connect the RS-
232 cable between the JTAGICE mkII and a free COM port on the PC. The power sup-
ply voltage should be between 9 and 12 Volts.
Alternatively, the JTAGICE mkII can be connected to the PC with a USB cable, making
an external power supply superfluous.

Supported Devices See the JTAGICE mkII “Related devices” list on www.atmel.com/avr, or use the AVR
Studio On-line Help for the most updated device list.

4 AVR JTAGICE mkII


2562C–AVR–07/06
Atmel Corporation Atmel Operations
2325 Orchard Parkway Memory RF/Automotive
San Jose, CA 95131, USA 2325 Orchard Parkway Theresienstrasse 2
Tel: 1(408) 441-0311 San Jose, CA 95131, USA Postfach 3535
Fax: 1(408) 487-2600 Tel: 1(408) 441-0311 74025 Heilbronn, Germany
Fax: 1(408) 436-4314 Tel: (49) 71-31-67-0
Fax: (49) 71-31-67-2340
Regional Headquarters Microcontrollers
Europe 2325 Orchard Parkway 1150 East Cheyenne Mtn. Blvd.
Atmel Sarl San Jose, CA 95131, USA Colorado Springs, CO 80906, USA
Route des Arsenaux 41 Tel: 1(408) 441-0311 Tel: 1(719) 576-3300
Case Postale 80 Fax: 1(408) 436-4314 Fax: 1(719) 540-1759
CH-1705 Fribourg
Switzerland La Chantrerie Biometrics/Imaging/Hi-Rel MPU/
Tel: (41) 26-426-5555 BP 70602 High Speed Converters/RF Datacom
Fax: (41) 26-426-5500 44306 Nantes Cedex 3, France Avenue de Rochepleine
Tel: (33) 2-40-18-18-18 BP 123
Asia Fax: (33) 2-40-18-19-60 38521 Saint-Egreve Cedex, France
Room 1219 Tel: (33) 4-76-58-30-00
Chinachem Golden Plaza ASIC/ASSP/Smart Cards Fax: (33) 4-76-58-34-80
77 Mody Road Tsimshatsui Zone Industrielle
East Kowloon 13106 Rousset Cedex, France
Hong Kong Tel: (33) 4-42-53-60-00
Tel: (852) 2721-9778 Fax: (33) 4-42-53-60-01
Fax: (852) 2722-1369
1150 East Cheyenne Mtn. Blvd.
Japan Colorado Springs, CO 80906, USA
9F, Tonetsu Shinkawa Bldg. Tel: 1(719) 576-3300
1-24-8 Shinkawa Fax: 1(719) 540-1759
Chuo-ku, Tokyo 104-0033
Japan Scottish Enterprise Technology Park
Tel: (81) 3-3523-3551 Maxwell Building
Fax: (81) 3-3523-7581 East Kilbride G75 0QR, Scotland
Tel: (44) 1355-803-000
Fax: (44) 1355-242-743

Literature Requests
www.atmel.com/literature

Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any
intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMEL’S TERMS AND CONDI-
TIONS OF SALE LOCATED ON ATMEL’S WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY
WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDEN-
TAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT
OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no
representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications
and product descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided
otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel’s products are not intended, authorized, or warranted for use
as components in applications intended to support or sustain life.

© Atmel Corporation 2006. All rights reserved. Atmel®, logo and combinations thereof, Everywhere You Are ®, AVR®, AVR Studio ®, and others,
are registered trademarks or trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others.

2562C–AVR–07/06

You might also like