8-bit Microcontrollers Connecting to a target board with the AVR JTAGICE mkII

8-bit Microcontrollers Connecting to a target board with the AVR JTAGICE mkII
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.
The JTAGICE mkII is supported by AVR Studio version 4.09 and later.
Connecting to target through the debugWIRE interface
JTAGICE mkII
Quick Start
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 unprogrammed. 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 having 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 relevant user guides for more information. All user guides are found in the AVR Studio Online 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 debugWIRE must have full control over the RESET pin.
Figure 1. ISP6PIN header pinout
1 2
MISO
SCK
RESET
VCC
MOSI
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
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
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 communication 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 session, 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 control 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 compatibility with other equipment.
nSRST is used to control and monitor the target reset line - this is not necessary for correct 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 target 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 RS232 cable between the JTAGICE mkII and a free COM port on the PC. The power supply 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
4
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.
AVR JTAGICE mkII
2562C–AVR–07/06
Atmel Corporation
2325 Orchard Parkway
San Jose, CA 95131, USA
Tel: 1(408) 441-0311
Fax: 1(408) 487-2600
Regional Headquarters
Europe
Atmel Sarl
Route des Arsenaux 41
Case Postale 80
CH-1705 Fribourg
Switzerland
Tel: (41) 26-426-5555
Fax: (41) 26-426-5500
Asia
Room 1219
Chinachem Golden Plaza
77 Mody Road Tsimshatsui
East Kowloon
Hong Kong
Tel: (852) 2721-9778
Fax: (852) 2722-1369
Japan
9F, Tonetsu Shinkawa Bldg.
1-24-8 Shinkawa
Chuo-ku, Tokyo 104-0033
Japan
Tel: (81) 3-3523-3551
Fax: (81) 3-3523-7581
Atmel Operations
Memory
2325 Orchard Parkway
San Jose, CA 95131, USA
Tel: 1(408) 441-0311
Fax: 1(408) 436-4314
RF/Automotive
Theresienstrasse 2
Postfach 3535
74025 Heilbronn, Germany
Tel: (49) 71-31-67-0
Fax: (49) 71-31-67-2340
Microcontrollers
2325 Orchard Parkway
San Jose, CA 95131, USA
Tel: 1(408) 441-0311
Fax: 1(408) 436-4314
La Chantrerie
BP 70602
44306 Nantes Cedex 3, France
Tel: (33) 2-40-18-18-18
Fax: (33) 2-40-18-19-60
ASIC/ASSP/Smart Cards
1150 East Cheyenne Mtn. Blvd.
Colorado Springs, CO 80906, USA
Tel: 1(719) 576-3300
Fax: 1(719) 540-1759
Biometrics/Imaging/Hi-Rel MPU/
High Speed Converters/RF Datacom
Avenue de Rochepleine
BP 123
38521 Saint-Egreve Cedex, France
Tel: (33) 4-76-58-30-00
Fax: (33) 4-76-58-34-80
Zone Industrielle
13106 Rousset Cedex, France
Tel: (33) 4-42-53-60-00
Fax: (33) 4-42-53-60-01
1150 East Cheyenne Mtn. Blvd.
Colorado Springs, CO 80906, USA
Tel: 1(719) 576-3300
Fax: 1(719) 540-1759
Scottish Enterprise Technology Park
Maxwell Building
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 CONDITIONS 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 INCIDENTAL 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
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement