background image

AVR

®

 ATmegaICE User Guide

5-1

Section 5

Trace Buffer

The AVR ATmegaICE has a 32K x 96-bit trace buffer which stores information about
program execution for every clock cycle. When the emulator is stopped, this trace buffer
can be examined to extract information about the history of the emulated program. The
details on which data are stored and how to retrieve them are described in the AVR Stu-
dio User Guide. When the trace buffer is full, it will wrap around and start overwriting the
oldest entries.

The trace buffer can be turned on or off at any program line. This makes it possible to
skip tracing delay loops and other subroutines which would otherwise fill the trace mem-
ory with unnecessary data. The trace buffer is inactive by default. To trace an entire pro-
gram, a “Trace on” marker should be placed on the first line of the program. 

Содержание AVR ATmegaICE

Страница 1: ... front end for both high level and assembly level debugging AVR Studio is described in Section 1 in the Development Tools User Guide and must be studied care fully in order to take full advantage of this product The ATmega ICE system consists of the following elements AVR ICE unit POD card ATmegaPOD Pod cable ATmega103 ATmega603 probe with TQFP64 adapter including cables RS 232 cable Power supply ...

Страница 2: ...the supplied RS 232 cable AVR Studio automatically detects if there is an emulator present on one of the PC s serial ports Note that if no ICE is found AVR Studio will show Simulator in the lower right corner of the main window If the ICE is found AVR Emulator will be indicated and your connections are correct AVR Studio will issue a warning if a program previously run in emulator mode is started ...

Страница 3: ...Introduction AVR ATmegaICE User Guide 1 3 Figure 1 4 ATmega103 ATmega603 Probe ...

Страница 4: ...Introduction 1 4 AVR ATmegaICE User Guide ...

Страница 5: ...e application and pay attention to connect it correctly If it is not connected correctly your ATmegaICE system may be damaged 10 When the probe is correctly connected to the application check the jumper marked J500 Ext Power on the ATmegaPOD see Figure 3 1 If the applica tion is to be powered from the ATmegaICE unit the jumper should be mounted If the application is to use its own power supply the...

Страница 6: ...Preparing the ATmegaICE System for Use 2 2 AVR ATmegaICE User Guide ...

Страница 7: ...ins several jumpers which must be set to achieve the desired operation The jumpers involved in the configuration are indicated in Figure 3 1 Figure 3 1 Pod Jumper Placements J112 J113 IN SYSTEM CONNECTORS J300 EXT CLOCK J354 J352 TCLK FREQ J351 J350 TCLK SRC J200 J201 J202 TARGET VOLTAGE J110 J111 IN SYSTEM CONNECTORS J500 EXT POWER ...

Страница 8: ...dio ATmegaICE also has a very accurate programmable internal clock which can be used for emulation Select this clock by choosing Internal Oscillator in the Emulator Options menu in AVR Studio Setting of J300 on the ATmegaPOD and crystals and clock signals in the user application are insignificant when the internal oscillator is selected 3 3 Timer Oscillator Setting In order to enable the Timer osc...

Страница 9: ... work around this is to lift pin 2 and 3 on U351 from the PCB and sol der a 32 kHz crystal directly to the pins without neither the pins nor the crystal touching the PCB 3 4 Power to Target PCB The ATmegaICE can power the target PCB with 5 0V To enable this option J500 should be mounted Note that the absolute maximum supply current is 1 0A so the tar get should use less than 5W of power to use thi...

Страница 10: ...ATmegaPOD 3 4 AVR ATmegaICE User Guide ...

Страница 11: ...e pin number on each header The column shows the correspond ing pin number on an ATmega103 ATmega603 device The numbering of the pins on each header is shown in Figure 4 1 Table 4 1 Pinout for Header J110 J110 1 PE0 PDI RXD 2 2 PEN 1 3 PE2 AC 4 4 PE1 PDO TXD 3 5 PE4 INT4 6 6 PE3 AC 5 7 PE6 INT6 8 8 PE5 INT5 7 9 PB0 SS 10 10 PE7 INT7 9 11 PB2 MOSI 12 12 PB1 SCK 11 13 PB4 OC0 PWM0 14 14 PB3 MISO 13 ...

Страница 12: ...CC 21 7 XTAL1 24 8 XTAL2 23 9 INT1 26 10 INT0 25 11 INT3 28 12 INT2 27 13 PD5 30 14 PD4 IC1 29 15 PD7 T2 32 16 PD6 T1 31 Table 4 3 Pinout for Header J112 J112 1 RD 34 2 WR 33 3 PC1 A9 36 4 PC0 A8 35 5 PC3 A11 38 6 PC2 A10 37 7 PC5 A13 40 8 PC4 A12 39 9 PC7 A15 42 10 PC6 A14 41 11 PA7 AD7 44 12 ALE 43 13 PA5 AD5 46 14 PA6 AD6 45 15 PA3 AD3 48 16 PA4 AD4 47 ...

Страница 13: ... for Header J113 J113 1 PA1 AD1 50 2 PA2 AD2 49 3 VCC 52 4 PA0 AD0 51 5 PF7 ADC7 54 6 GND 53 7 PF5 ADC5 56 8 PF6 ADC6 55 9 PF3 ADC3 58 10 PF4 ADC4 57 11 PF1 ADC1 60 12 PF2 ADC2 59 13 AREF 62 14 PF0 ADC0 61 15 AVCC 64 16 AGND 63 POD Cable J110 J111 J112 J113 15 13 11 9 7 5 3 1 16 14 12 10 8 6 4 2 ...

Страница 14: ...Connecting to the System 4 4 AVR ATmegaICE User Guide ...

Страница 15: ...which data are stored and how to retrieve them are described in the AVR Stu dio User Guide When the trace buffer is full it will wrap around and start overwriting the oldest entries The trace buffer can be turned on or off at any program line This makes it possible to skip tracing delay loops and other subroutines which would otherwise fill the trace mem ory with unnecessary data The trace buffer ...

Страница 16: ...Trace Buffer 5 2 AVR ATmegaICE User Guide ...

Страница 17: ...f a trigger point for that particular pin is set in the code The Trigger Input Global Mask Register controls which of the input pins are allowed to break the emulator If more than one line is enabled the emulator will break on either one but will not store any information about which input caused the event Note that unconnected inputs are pulled high by internal pull up resistors Unused lines must...

Страница 18: ...External Triggers 6 2 AVR ATmegaICE User Guide ...

Страница 19: ...gain and restart AVR Studio Turn off power and disconnect your target application Then try again If everything is OK now this indicates that something in your target application is disturbing normal operation Turn off power and disconnect your pod card Then try again If everything is OK now this indicates that your settings on the pod card are wrong and disturbs normal operation If your ATmegaICE ...

Страница 20: ...Troubleshooting Procedures 7 2 AVR ATmegaICE User Guide ...

Страница 21: ...yzer 1 on the back panel of the AVR ICE unit has the following pin out with signals from the instruction address bus Table 8 1 Logic Analyzer Connector 1 SIGNAL Logic Analyzer 1 SIGNAL AVRCLK Pin 1 Pin 2 Low Low Pin 3 Pin 4 A15 A14 Pin 5 Pin 6 A13 A12 Pin 7 Pin 8 A11 A10 Pin 9 Pin 10 A9 A8 Pin 11 Pin 12 A7 A6 Pin 13 Pin 14 A5 A4 Pin 15 Pin 16 A3 A2 Pin 17 Pin 18 A1 A0 Pin 19 Pin 20 GND ...

Страница 22: ...nel of the AVR ICE unit is used for external triggers and has the following pinout Table 8 2 Logic Analyzer Connector 2 SIGNAL Logic Analyzer 2 SIGNAL AVRCLK Pin 1 Pin 2 Low Low Pin 3 Pin 4 D15 D14 Pin 5 Pin 6 D13 D12 Pin 7 Pin 8 D11 D10 Pin 9 Pin 10 D9 D8 Pin 11 Pin 12 D7 D6 Pin 13 Pin 14 D5 D4 Pin 15 Pin 16 D3 D2 Pin 17 Pin 18 D1 D0 Pin 19 Pin 20 GND Table 8 3 AUX Connector SIGNAL AUX SIGNAL GND...

Страница 23: ...midity Non condensing 10 90 Operating 5 95 Non Operating Shock 20 g 11ms half sine Vibration 5 g Connections Power Connector 5 5 mm OD 2 1mm ID Center Negative Host Serial Connector RS 232 9 pin D SUB Female Serial Communications Speed 19200 bits s Pod Connectors two 2 x 32 Male Header External Trigger Inputs Outputs Connector 2 x 7 Male Header Logic Analyzer Interface Connectors two 2 x 10 Male H...

Страница 24: ...kHz Maximum Single step speed 6 0 MHz Minimum breakpoint speed 32 768 kHz Maximum breakpoint speed 6 0 MHz Memory specification Program Memory 128K bytes Event Memory 128K bytes EEPROM Memory 64K bytes SRAM Memory 64K bytes Register file 32 bytes I O area 64 bytes Trace buffer memory 32K x 12 bytes I O pins Output level CMOS VCC 2 7 5 5 VDC Maximum sink current 24 mA Maximum source current 10 mA P...

Страница 25: ... use contrary to any instructions issued by Atmel Atmel shall at its sole option either repair replace or credit Buyer the purchase price of such goods No goods may be returned to Atmel without Atmel s Returned Material Authorization form Prior to any return of goods by Buyer pursuant to this Section Buyer shall afford Atmel the opportunity to inspect such goods at Buyer s location and any such go...

Страница 26: ...tmel shall not under any circumstances be liable to Buyer or any third parties for consequential incidental indi rect exemplary special or other damages Atmel s total liability shall not exceed the total amount paid by Buyer to Atmel hereunder Atmel shall not under any circum stances be liable for excess costs of reprocurement ...

Страница 27: ...rademarks of Atmel Corporation Terms and product names in this document may be trademarks of others Atmel Headquarters Atmel Operations Corporate Headquarters 2325 Orchard Parkway San Jose CA 95131 TEL 408 441 0311 FAX 408 487 2600 Europe Atmel U K Ltd Coliseum Business Centre Riverside Way Camberley Surrey GU15 3YL England TEL 44 1276 686677 FAX 44 1276 686697 Asia Atmel Asia Ltd Room 1219 Chinac...

Отзывы: