ATxmega128A1U/ATxmega64A1U
XMEGA
®
A1U Data Sheet
Introduction
The AVR
®
XMEGA
®
AU is a family of low power, high performance, and peripheral rich 8/16-bit microcon-
trollers based on the AVR enhanced RISC architecture. The XMEGA A1U is a 100-pins device ranging
from 64KB to 128KB Flash, with 4KB to 8KB SRAM, 2KB EEPROM and up to 8KB boot section. The
ATxmegaA1U devices operate at a maximum frequency of 32MHz. By executing instructions in a single
clock cycle, the devices achieve CPU throughput approaching one million instructions per second (MIPS)
per megahertz, allowing the system designer to optimize power consumption versus processing speed.
Features
High-performance, low-power AVR
®
XMEGA
®
8/16-bit Microcontroller
Nonvolatile program and data memories
64K - 128KBytes of in-system self-programmable flash
4K - 8KBytes boot section
2KBytes EEPROM
4K - 8KBytes internal SRAM
External bus interface for up to 16Mbytes SRAM
External bus interface for up to 128Mbit SDRAM
Peripheral features
Four-channel DMA controller
Eight-channel event system
Eight 16-bit timer/counters
Four timer/counters with 4 output compare or input capture channels
Four timer/counters with 2 output compare or input capture channels
High resolution extension on all timer/counters
Advanced waveform extension (AWeX) on two timer/counters
USB 2.0 full speed (12Mbps) and low speed (1.5Mbps) device compliant
32 Endpoints with full configuration flexibility
One USB device interface
Eight USARTs with IrDA support for one USART
Four two-wire interfaces with dual address match (I
2
C and SMBus compatible)
Four serial peripheral interfaces (SPIs)
AES and DES crypto engine
2018 Microchip Technology Inc.
Data Sheet Complete
DS40002058A-page 1
ATxmega128A1U/ATxmega64A1U
CRC-16 (CRC-CCITT) and CRC-32 (IEEE
®
802.3) generator
16-bit real time counter (RTC) with separate oscillator
Two sixteen channel, 12-bit, 2msps Analog to Digital Converters
Two Two-channel, 12-bit, 1msps Digital to Analog Converters
Four Analog Comparators (ACs) with window compare function, and current sources
External interrupts on all general purpose I/O pins
Programmable watchdog timer with separate on-chip ultra low power oscillator
QTouch
®
library support
Capacitive touch buttons, sliders and wheels
Special microcontroller features
Power-on reset and programmable brown-out detection
Internal and external clock options with PLL and prescaler
Programmable multilevel interrupt controller
Five sleep modes
Programming and debug interfaces
JTAG (IEEE 1149.1 compliant) interface, including boundary scan
PDI (Program and Debug Interface)
I/O and packages
78 Programmable I/O pins
100 lead TQFP
100 ball BGA
100 ball VFBGA
1.6 – 3.6V
0 – 32MHz from 2.7V
Operating voltage
2018 Microchip Technology Inc.
Data Sheet Complete
DS40002058A-page 2
ATxmega128A1U/ATxmega64A1U
Table of Contents
1
2
3
4
5
6
Ordering Information ............................................................................... 8
Pinout/Block Diagram .............................................................................. 9
Overview ................................................................................................. 11
3.1
Block Diagram ................................................................................................. 12
Resources ............................................................................................... 13
4.1
Recommended reading ................................................................................... 13
Capacitive touch sensing ...................................................................... 13
AVR CPU ................................................................................................. 14
6.1
6.2
6.3
6.4
6.5
6.6
6.7
6.8
Features .......................................................................................................... 14
Overview.......................................................................................................... 14
Architectural Overview..................................................................................... 14
ALU - Arithmetic Logic Unit ............................................................................. 15
Program Flow .................................................................................................. 16
Status Register ................................................................................................ 16
Stack and Stack Pointer .................................................................................. 16
Register File .................................................................................................... 16
7
Memories ................................................................................................ 17
7.1
7.2
7.3
7.4
7.5
7.6
7.7
7.8
7.9
7.10
7.11
7.12
7.13
7.14
Features .......................................................................................................... 17
Overview.......................................................................................................... 17
Flash Program Memory ................................................................................... 18
Fuses and Lock bits......................................................................................... 19
Data Memory ................................................................................................... 19
EEPROM ......................................................................................................... 20
I/O Memory...................................................................................................... 20
External Memory ............................................................................................. 20
Data Memory and Bus Arbitration ................................................................... 20
Memory Timing ................................................................................................ 21
Device ID and Revision ................................................................................... 21
I/O Memory Protection..................................................................................... 21
JTAG Disable .................................................................................................. 21
Flash and EEPROM Page Size....................................................................... 21
8
DMAC – Direct Memory Access Controller .......................................... 23
2018 Microchip Technology Inc.
Data Sheet Complete
DS40002058A-page 3
ATxmega128A1U/ATxmega64A1U
8.1
8.2
Features .......................................................................................................... 23
Overview.......................................................................................................... 23
9
Event System .......................................................................................... 24
9.1
9.2
Features .......................................................................................................... 24
Overview.......................................................................................................... 24
10 System Clock and Clock options ......................................................... 25
10.1
10.2
10.3
Features .......................................................................................................... 25
Overview.......................................................................................................... 25
Clock Sources ................................................................................................. 26
11 Power Management and Sleep Modes ................................................. 28
11.1
11.2
11.3
Features .......................................................................................................... 28
Overview.......................................................................................................... 28
Sleep Modes.................................................................................................... 28
12 System Control and Reset .................................................................... 30
12.1
12.2
12.3
12.4
Features .......................................................................................................... 30
Overview.......................................................................................................... 30
Reset Sequence .............................................................................................. 30
Reset Sources ................................................................................................. 30
13 WDT – Watchdog Timer ......................................................................... 32
13.1
13.2
Features .......................................................................................................... 32
Overview.......................................................................................................... 32
14 Interrupts and Programmable Multilevel Interrupt Controller ........... 33
14.1
14.2
14.3
Features .......................................................................................................... 33
Overview.......................................................................................................... 33
Interrupt vectors............................................................................................... 33
15 I/O Ports .................................................................................................. 36
15.1
15.2
15.3
15.4
15.5
Features .......................................................................................................... 36
Overview.......................................................................................................... 36
Output Driver ................................................................................................... 37
Input sensing ................................................................................................... 39
Alternate Port Functions .................................................................................. 39
16 TC0/1 – 16-bit Timer/Counter Type 0 and 1 ......................................... 40
16.1
16.2
Features .......................................................................................................... 40
Overview.......................................................................................................... 40
2018 Microchip Technology Inc.
Data Sheet Complete
DS40002058A-page 4
ATxmega128A1U/ATxmega64A1U
17 TC2 – Time/Counter Type 2 ................................................................... 42
17.1
17.2
Features .......................................................................................................... 42
Overview.......................................................................................................... 42
18 AWeX – Advanced Waveform Extension ............................................. 43
18.1
18.2
Features .......................................................................................................... 43
Overview.......................................................................................................... 43
19 Hi-Res – High Resolution Extension .................................................... 44
19.1
19.2
Features .......................................................................................................... 44
Overview.......................................................................................................... 44
20 RTC – 16-bit Real-Time Counter ........................................................... 45
20.1
20.2
Features .......................................................................................................... 45
Overview.......................................................................................................... 45
21 USB – Universal Serial Bus Interface ................................................... 46
21.1
21.2
Features .......................................................................................................... 46
Overview.......................................................................................................... 46
22 TWI – Two-Wire Interface ...................................................................... 48
22.1
22.2
Features .......................................................................................................... 48
Overview.......................................................................................................... 48
23 SPI – Serial Peripheral Interface ........................................................... 50
23.1
23.2
Features .......................................................................................................... 50
Overview.......................................................................................................... 50
24 USART ..................................................................................................... 51
24.1
24.2
Features .......................................................................................................... 51
Overview.......................................................................................................... 51
25 IRCOM – IR Communication Module .................................................... 52
25.1
25.2
Features .......................................................................................................... 52
Overview.......................................................................................................... 52
26 AES and DES Crypto Engine ................................................................ 53
26.1
26.2
Features .......................................................................................................... 53
Overview.......................................................................................................... 53
27 CRC – Cyclic Redundancy Check Generator ...................................... 54
27.1
27.2
Features .......................................................................................................... 54
Overview.......................................................................................................... 54
2018 Microchip Technology Inc.
Data Sheet Complete
DS40002058A-page 5