– Four-channel DMA Controller with support for external requests
– Five 16-bit Timer/Counters
3 Timer/Counters with 4 Output Compare or Input Capture channels
2 Timer/Counters with 2 Output Compare or Input Capture channels
High Resolution Extensions on all Timer/Counters
Advanced Waveform Extension on 1 Timer/Counter
– Five USARTs
IrDA Extension on one USART
– TwoTwo-Wire Interfaces (I
– Two SPIs (Serial Peripheral Interfaces)
– AES and DES Crypto Engine
– 16-bit Real Time Counter with Separate Oscillator
– One 12-channel, 12-bit, 2 Msps ADCs
– One 2-channel, 12-bit, 1 Msps DACs
– Two Analog Comparators
– External Interrupts on all General Purpose I/O pins
– Programmable Watchdog Timer with Separate On-chip Oscillator
• Special Microcontroller Features
– Power -on Reset and Pr ogrammab le Brown-out Detection
– Internal and External Clock Options with PLL
– Programmable Multi-level Interrupt Controller
– Sleep Modes: Idle, Power-down, Standby, Power-save, Extended Standby
– Advanced Programming, Test and Debugging Interfaces
PDI (Program and Debug Interface) for programming, test and debugging
Note:1. This device can also be supplied in waf er form. Please contact your local Atmel sales office for detailed ordering information.
2. Pb-free packaging, complies to the European Directive for Restriction of Hazardous Substances (RoHS directive). Also
Halide free and fully Green.
44A
44M1
8069A–AVR–02/08
Package Type
44-lead, 10 x 10 mm Body Size, 1.0 mm Body Thickness, 0.8 mm Lead Pitch, Thin Profile Plastic Quad Flat Package (TQFP)
44-pad, 7 x 7 x 1.0 mm Body, Lead Pitch 0.50 mm, 5.20 mm Exposed Pad, Micro Lead Frame Package (MLF)
3
ATxmega A4
3.Disclaimer
4.Overview
Typical values contained in this datasheet are based on simulations and characterization of
other AVR microcontrollers manufactured o n th e same proce ss te ch nolo gy. Min a nd Ma x valu es
will be available after the device is characterized.
The XMEGA A4 is a family of low power, high performance and peripheral rich CMOS 8/16-bit
microcontrollers based on the AVR
instructions in a single clock cycle, the XMEGA A4 achieves throughputs approaching 1 MIPS
per MHz allowing the system designer to optimize power co nsumption versus pr ocessing speed.
5.Resources
A comprehensive set of development tools, application notes, and datasheets are available for
download on http://www.atmel.com.
5.1Recommended reading
• XMEGA A Manual
• Application Notes
This document contains part specific information only. The XMEGA A Manual describes the
peripherals in-depth. The application notes contains example code and show applied use of the
peripherals.
®
enhanced RISC architecture. By executing powerful
4
8069A–AVR–02/08
6.AVR CPU
6.1Features
6.2Overview
ATxmega A4
• 8/16-bit high performance AVR RISC Architecture
– 139 instructions
– Hardware multiplier
• 32x8-bit registers directly connected to the ALU
• Stack in RAM
• Stack Pointer accessible in I/O memory space
• Direct addressing of up to 16M bytes of program and data memory.
• True 16/24-bit access to 16/24-bit I/O registers
• Support for 8-, 16- and 32-bit Aritmetic’s
• Configuration Change Protection of system critical features.
The XMEGA A4 uses an 8/16-bit AVR CPU. The main function of the CPU is to ensure correct
program execution. The CPU must therefore be able to access memories, perform calculations
and control peripherals. Interrupt h andling is de scribed in a separat e section. Figure 6-1 on page
5 shows the CPU block diagram.
Figure 6-1.CPU block diagram
DATA BUS
Program
Counter
Indirect Addressing
32 x 8
General
Purpose
Registers
FLASH
Program
Memory
SRAM
Data
ALU
Direct Addressing
Instruction
Register
I/O
MODULE 1
I/O
MODULE n
The AVR uses a Harvard architecture - with separate memories and buses for program and
data. Instructions in the program memory are executed with a single level pipeline. While one
instruction is being executed, the next instruction is pre-fetched from the program memory. This
concept enables instructions to be executed in every clock cycle. The pr ogram memory is InSystem Re-programmable Flash mem o ry.
Instruction
Decoder
I/O
MODULE n
DATA BUS
EEPROMI/O LINES
STATUS/
CONTROL
PMIC
8069A–AVR–02/08
5
ATxmega A4
6.3Register File
The fast-access Register File contains 32 x 8-bit general purpose working registers with a single
clock cycle access time. This allows single-cycle Arithmetic Logic Unit (ALU) operation. In a typical ALU operation, two operands are output from the Register File, the operation is executed,
and the result is stored back in the Register File - in one clock cycle.
Six of the 32 registers can be used as three 16-bit indirect address register pointers for Data
Space addressing - enabling efficient address calculations. One of these add ress pointers can
also be used as an address pointer for look up tables in Flash program memory.
6.4ALU - Arithmetic Logic Unit
The high performance Arithmetic Logic Unit (ALU) supports arithmetic and logic operations
between registers or between a constant and a register. Single register operations can also be
executed in the ALU. Within a single clock cycle, arithmetic operations between genera l purpose
registers or between a register and an immediate are executed. Aft er an arithmetic or logic operation, the Status Register is updated to reflect information about the result of the operation.
The ALU operations are divided into three main categories – arithmetic, logical, and bit-functions. Both 8-, 16 and 32-bit arithmet ic is supp orted. Th e ALU als o provide a powerfu l multiplier
supporting both signed/unsigned multiplication and fractional format.
6.5Program Flow
Program flow is provided by conditional and unconditional jump and call instructions, able to
address the whole address space directly. Most AVR instructions use a 16-bit word format.
Some instructions also use a 32-bit format.
The Program Flash memory space is divided in two sections, the Boot section and the Application section. Both sections have dedicated Lock bits for write and read/write protection. The
Store Program Memory (SPM) instruction used to access the Application section must reside in
the Boot section.
A third section exists inside the Application section. This section, the Application Table section,
has separate Lock bits for write and read/write protection. The Application Table section can be
used for storing non-volatile data or application software.
The Program Counter (PC) addresses t he locat ion fr om wh ere t he instru ction s are f etched . Af ter
a reset, the PC is set to location ‘0’.
During interrupts and subroutine calls, the return address PC is stored on the Stack. The Stack
is effectively allocated in the general data SRAM, and consequent ly the Stack size is o nly limited
by the total SRAM size and the usage of the SRAM. The Stack Pointer (SP) is default reset to
the highest address of the internal SRAM. The SP is read/write accessible in the I/O space. The
data SRAM can easily be accessed through the five dif ferent addr essing modes support ed in the
AVR architecture.
6
8069A–AVR–02/08
7.Memories
7.1Features
7.2Overview
ATxmega A4
• Flash Program Memory
– One linear address space
– In-System Reprogrammable
– Self-Programming and Bootloader support
– Application Section fo r ap plication code
– Application Table Section for application code or data storage
– Bootloader Section for application code or bootl oader code
– Separate lock bits and protection for all sections
• Data Memory
– One linear address space
– Single cycle access from CPU
– SRAM
– EEPROM
Byte or page accessible
Optional memory mapping for direct Load/Store
– I/O Memory
Configuration and Status register for all peripherals and modules
16 bit accessible General Purpose Register for global variable or flags
– External Memory
– Bus arbitration
Safe and deterministic handling of CPU and DMA Controller priority
– Separate buses for SRAM, EEPROM, IO Memory and External Memory access
• Enables simulatiouns bus access for CPU and DMA Controller
The AVR architecture has two main memory spaces, the Program Memory and the Data Memory. In addition, the XMEGA A4 features an EEPROM Memory for non-volatile data storage. All
three memory spaces are linear and require no pagi ng. The memory conf igurations are shown in
”Ordering Information” on page 3.
Non-volatile memory spaces can be locked for further write and read/write operations. This prevents unrestricted access to the application software.
7.3In-system Programmable Flash Program Memory
The XMEGA A4 contains On-chip In-System Re-programmable Flash memory for program storage, see Table 7-1 on page 8. Since all AVR instructions are 16- or 32-bits wide, each Flash
address location is 16 bits.
The XMEGA A4 has additional Boot section for bootloader applications. The Store Program
Memory (SPM) instruction used to write to the Flash will only operate from this section. Operation of the SPM is also associated with Boot Lock bits for software protection.
The XMEGA A4 has an Application Table section inside the Application section for storage of
Non-volatile data.
8069A–AVR–02/08
7
ATxmega A4
Figure 7-1.Flash Program Memory (Hexadecimal address)
Word Address
EFFF/77FF/37FF/17FF
F000/7800/3800/1800
FFFF/7FFF/3FFF/1FFF
10000/8000/4000/2000
10FFF/87FF/47FF/27FF
The Application Table- and Boot sections can also be used for general application software.
7.4SRAM Data Memory
The XMEGA A4 has internal SRAM memory for data storage. The Memory Map for the devices
in the family resemble each other, see Table 7-2 on page 8.
7.5EEPROM Data Memory
The XMEGA A4 has internal EEPROM memory for non-volatile data storage. It is addressable
either in a separate data space or it can be memory mapped the normal data space. The
EEPROM memory supports both byte and page access.
The Internal SRAM and EEPROM memory spaces start at the same address in all devices, see
Table 7-2 on page 8. The Reserved memory space is empty.
All XMEGA A4 I/Os and peripherals are addressable through I/O memory locations in the data
memory space. All I/O locations may be accessed by the LD/L DS/LDD and ST/STS/STD
instructions, transferring data between the 32 general purpose registers and the I/O memory.
IN and OUT instructions can address I/O memory locations in the range 0x00 - 0x3F directly.
I/O registers within the address range 0x00 - 0x1F are directly bit-accessible using the SBI and
CBI instructions. The value of single bits can be checked by using th e SBIS and SBIC instructions in these registers.
The I/O space definition of the XMEGA A4 is shown in ”Peripheral Module Address Map” on
page 48.
8069A–AVR–02/08
9
ATxmega A4
8.DMA - Direct Memory Access Controller
8.1Features
• Allows High-speed data transfer
– From memory to peripheral
– From memory to memory
– From peripheral to memory
– From peripheral to peripheral
• 4 Channels
• From 1 byte and up to 16 M bytes transfers in a single transaction
• Multiple addressing modes for source and destination address
–Incremental
– Decremental
– Static
• 1, 2, 4, or 8 bytes Burst Transfers
• Programmable priority between channels
8.2Overview
The XMEGA A4 has a Direct Memory Access (DMA) controller to move data between memories
and peripherals in the data space. The DMA controller uses the same data bus as the CPU to
transfer data.
The XMEGA A4 has 4 DMA channels that may be configured independently. The DMA controller supports transfer of up to 64K data blocks and can be configured to access memory with
incrementing, decrementing or static addressing.
Since the DMA can access all the peripherals through the I/O memory, the DMA may be used
for automatic transfer of data to/from communication modules, as well as automatic da ta
retrieval from ADC conversions or data transfer to DAC conversions.
The DMA controller can read from memory mapped EEPROM, but it cannot write to the
EEPROM or access the Flash.
10
8069A–AVR–02/08
9.Event System
9.1Features
9.2Overview
• Inter peripheral communication and signalling
• CPU and DMA independent operation
• 8 Event Channels allows for up to 8 signals to be routed at the same time
• Events can be generated by
– TImer/Counters (TCxn)
– Real Time Counter (RTC)
– Analog to Digital Converters (ADCx)
– Analog Comparators (ACx)
– Ports (PORTx)
– System Clock (Clk
– Software (CPU)
SYS
)
• Events can be used by
– TImer/Counters (TCxn)
– Analog to Digital Converters (ADCx)
– Digital to Analog Converters (DACx)
– Ports (PORTx)
– DMA Controller (DMAC)
• Advanced Features
– Manual Event Generation from software (CPU)
– Quadrature Decoding
– Digital Filtering
• Operative in Active and Idle mode
ATxmega A4
The Event System is a set of features for inter pe ripheral comm unication. It enable s the possibility for a change of state in one peripheral to automatically trigger actions in other pe ripherals.
What change of state in a peripheral that will trigger actions in other peripherals is configurable
in software. It is a simple, but powerful system as it allows for autonomous cont rol of per iph erals
without any use of interrupt, CPU or DMA resources
The indication of a change of state in a peripheral is referred to as an event. The events are
passed between peripherals using a dedicated ro uting network called the Event Routing Net work. Figure 9-1 on page 12 shows a basic block diagram of the Event System with the Event
Routing Network and the peripherals that are connected. The event system is no t a single enti ty,
but a set of features for inter peripheral communication. This highly flexible system can be used
for simple rerouting of signals, pin functions or for sequencing of events.
The Event System is functional in both Active- and Idle mode.
8069A–AVR–02/08
11
ATxmega A4
Figure 9-1.Event System Block Diagram
CPU
ADCx
DACx
PORTxn
The the event routing network can directly connect together ADCs, DACs, Analog Comparators
(AC), I/O ports (PORT), the Real-time Counter (RTC), and Timer/Counters (T/C). Events can
also be generated from software (CPU).
• PLL with internal and external clock options and 1 to 31x multiplication
• Clock Prescalers with 1 to 2048x division
• Fast peripheral clock.
• Automatic Run-Time Calibration of internal oscillators
• Crystal Oscillator failure detection
10.2Overview
XMEGA A4 has an advanced clock system, supporting a lar ge numbe r of clo ck sources. It in corporates both integrated oscillators, and external crystal oscillators and resonators. A high
frequency Phase Locked Loop (PLL) and clock pr escalers can be controlled from software to
generate a wide range of clock frequencies. The clock distribution also enables the possibility to
switch between clock sources from software during run-time. A calibration feature (DFLL) is
available, and can be used for automatic run-time calibration of the internal oscillators. A Crystal
Oscillator Failure Monitor can be enabled to issue a Non-Maskable Interrupt and switch to internal oscillator if the external oscillator fails. Figure 10-1 on page 14 shows the principal clock
system in XMEGA A4.
ATxmega A4
8069A–AVR–02/08
13
ATxmega A4
Figure 10-1. Clock system overview
32 KHz ULP
Internal Oscillator
32 KHz Calibrated
Internal Oscillator
32 KHz
Crystal Oscillator
0.4 - 16 MHz
Crystal Oscillator
2 MHz
Run-time Calibrated
Internal Oscillator
32 MHz
Run-time Calibrated
Internal Oscillator
CLOCK
CONTROL
UNIT
with PLL
WDT/BOD
RTC
PERIPHERALS
ADC
DAC
...
...
SYSTEM
CPU
DMA
INTERRUPT
...
MEMORY
RAM
External
Clock Input
Each clock source is briefly described in the following sub-sections.
FLASH
EEPROM
...
14
8069A–AVR–02/08
10.3Clock Options
10.3.132 kHz Ultra Low Pow e r Inte rnal Os c ill at or
The 32 kHz Ultra Low Power (ULP) Internal Oscillator is a very low power consumptio n clock
source based on internal components only. As it is intended mainly for system functions, it
should not be used when an accurate clock is required.
10.3.232 kHz Calibrated Internal Oscillator
Compared to the internal ULP oscillator, the 32 kHz Calibrated Internal Oscillator is a high accuracy clock source based on internal components only.
10.3.332 kHz Crystal Oscillator
The 32 kHz Crystal Oscillator is a low power driver for an external watch crystal.
10.3.40.4 - 16 MHz Crystal Oscillator
The 0.4 - 16 MHz Crystal Oscillator is a driver intended both for driving resonators and crystals
from 400 kHz to 16 MHz.
The 2 MHz Run-time Calibrated Internal Oscillator is a high frequency oscillator based on internal components only. The oscillator can use the 32 kHz Calibrated Internal Oscillator or the 32
kHz Crystal Oscillator to calibrate the frequency run-time to compensate for temperature and
voltage drift, optimizing the accuracy of the oscillator.
The 32 MHz Run-time Calibrated Internal Oscillator is a high frequency oscillator based on internal components only. The oscillator can use the 32 kHz Calibrated Internal Oscillator or the 32
kHz Crystal Oscillator to calibrate the frequency run-time to compensate for temperature and
voltage drift, optimizing the accuracy of the oscillator.
10.3.7External Clock input
The external clock input gives the possibility to connect to a clock from an external source.
10.3.8PLL with Multiplication factor 2 - 31x
The PLL provides the possibility of multiplying a frequency with any real number from 2 to 31. In
combination with some prescalers, this gives a numerous number of clock frequency options to
use.
• Power Reduction register to disable clock to un u sed peripheral
11.2Overview
The XMEGA A4 provides various sleep modes tailored to reduce power consumption to a minimum. All sleep modes are accessible from Active mode. In Active mode the CPU is executing
application code. The application code decides when and what sleep mode to enter. Interrupts
from enabled peripherals and all enabled reset sources can restore the microcontroller from
sleep to Active mode. This is called a wake-up
In addition Power Reduction Registers (PRR) provides a method to stop the clock to individual
peripherals from software. When this is done the current state of the peripheral is frozen and
there is no power consumption from the peripheral.
11.3Sleep Modes
11.3.1Idle Mode
In Idle mode the CPU and Non-Volatile Memory are stopped, but all peripherals including the
Interrupt Controller, Event System and DMA Controller are kept running.
Interrupt request from all enabled interrupts will wake the device.
11.3.2Power-down Mode
Power-save mode is identical to Power-down, with one exception:
If the Real Time Counter (RTC) is enabled, it will keep running during sleep and the device can
also wake up from either RTC Overflow or Compare Match interrupt.
11.3.3Power-save Mode
Power-save mode is identical to Power-down, with one exception:
If the Real Time Counter (RTC) is enabled, it will keep running during sleep and the device can
also wake up from either RTC Overflow or Compare Match interrupt.
11.3.4Standby Mode
Standby mode is identical to Power-down with the exception that the system clock sources are
kept running, while the CPU, Peripheral and RTC clocks are stopped. This r edu ces t he wake-up
time when external crystals or resonators are used.
16
8069A–AVR–02/08
11.3.5Extended Standby Mode
Extended Standby mode is identical to Power-save mode with the exception that the system
clock sources are kept running while the CPU and Peripheral clocks are stopped. This reduces
the wake-up time when external crystals or resonators are used.
ATxmega A4
8069A–AVR–02/08
17
ATxmega A4
12. System Control and Reset
12.1Resetting the AVR
During reset, all I/O Registers are set to their initial values. Application execution starts from the
Reset Vector. The instruction placed at t he Reset Vector should be a JMP - Absolute Jump instruction to the reset handling r outine. If the applic ation neve r enab les an int errupt sour ce, th e
Interrupt Vectors are not used. The regular application code can then be placed at these locations. This is also the case if the Reset Vector is in the Application section while the Interrupt
Vectors are in the Boot section or vice versa.
The I/O ports of the AVR are immediately tri-stated when a reset source goes active.
The reset functionality is asynchronous, hence no running clock is required to reset the device.
12.2Reset Sources
The reset source can be determined by the application by readig a reset status register. The
XMEGA A4 has the following sources of reset:
•
Power-on Reset
• External Reset
• Watchdog Reset
• Brown-out Reset
• PDI reset
• Software reset
12.2.1Power-on Re se t
The MCU is reset when the supply voltage VCC is below the Power-on Reset threshold voltage.
12.2.2External Reset
The MCU is reset when a low level is present on the RESET pin.
12.2.3Watchdog Reset
The MCU is reset when the Watchdog Timer period exp ires and the Wat chdog Reset is enable d.
12.2.4Brown-out Reset
The MCU is reset when the supply voltage VCC is below the Brown-out Reset threshold voltage
and the Brown-out Detector is enabled.
12.2.5PDI reset
The MCU may be reset through the Program and Debug Interface (PDI).
12.2.6Software reset
The MCU may be reset by the CPU writing to a special I/O register.
18
8069A–AVR–02/08
12.3WDT - Watchdog Timer
12.3.1Features
11 selectable timeout period, from 8 ms to 8s.
•
• Two operation modes
– Standard mode
– Window mode
• Runs from 1 kHz Ultra Low Power clock reference
• Configuration lock
12.3.2Overview
The XMEGA A4 has a Watchdog Timer (WDT) that will run continuously when turned on. If the
Watchdog Timer is not reset within a software configurable time-out period, the microcontroller
will reset. To prevent this reset, a Watchdog Reset (WDR) instruction must be run by software to
reset the WDT.
The WDT has a Window mode. In this mode the WDR instruction must be run within a specified
period called a window. Application software can set the minimum and maximum limits for this
window. If the WDR instruction is not run inside the window limits, the microcontroller will be
reset.
ATxmega A4
For maximum safety, the WDT also has an Always-on mode. This mode is enabled by programming a fuse. In Always-on mode, application software can not disable t he WDT.
A protection mechanism is used to prevent unwante d enabling, disabling or change of WDT
settings.
– 3 programmable interrupt levels
– Selectable priority scheme within low level interrupts (round-robin or fixed)
– Non-Maskable Interrupts (NMI)
• Interrupt vectors can be moved to the start of the Boot Section
13.2Overview
XMEGA A4 has a Programmable Multi-level Interrupt Controller (PMIC). All peripherals can
define three different priority levels for interrupts; high, medium or low. Medium level interrupts
may interrupt low level interrupt service routines. High level interrupts may interrupt both lowand medium level interrupt service routines. Low level interrupts have an optional round robin
scheme to make sure all interrupts are serviced within a certain amount of time.
A Non-Maskable Interrupt (NMI) can detect oscillator failure.
13.3Interrupt vectors
When an interrupt is serviced, the program counter will jump to the interrupt vector address. The
interrupt vector is the sum of the module or peripherals base address and the specific interrupt's
offset address. The base addresses for the XMEGA A4 device is shown in Table 13-1. Offset
addresses for each interrupt available in the peripheral are described for each peripheral in the
XMEGA A manual. For peripherals or modules that have only one interrupt, the interrupt vector
is shown in Table 13-1. The program address is the word add ress.
Table 13-1.Reset and Interrupt Vectors
Program Address
(Base Address)SourceInterrupt Description
0x000RESET
0x002IVEC_XOSCF_INT_vectCrystal Oscillator Failure Interrupt vector (NMI)
0x004IVEC_PORTC_INT_basePort C Interrupt base
0x008IVEC_PORTR_INT_basePort R Interruptbase
0x00CIVEC_DMAC_INT_baseDMA Controller Interrupt base
0x014IVEC_RTC_INT_baseReal Time Counter Interrupt base
0x018IVEC_TWIC_INT_baseTwo-Wire Interface on Port C Interrupt base
0x01CIVEC_TIMERC0_INT_baseTimer/Counter 0 on port C Interrupt base
0x028IVEC_TIMERC1_INT_baseTimer/Counter 1 on port C Interrupt base
0x030IVEC_SPIC_INT_vectSPI C Interrupt vector
0x032IVEC_USARTC0_INT_baseUSART 0 on port C Interrupt base
0x03DIVEC_USARTC1_INT_baseUSART 1 on port C Interrupt base
0x03EIVEC_AES_INT_vectAES Interrupt vector
0x040IVEC_NVM_INT_baseNon-Volatile Memory INT base
20
8069A–AVR–02/08
Table 13-1.Reset and Interrupt Vectors (Continued)
Program Address
(Base Address)SourceInterrupt Description
0x044IVEC_PORTB_INT_basePort B INT base
0x04EIVEC_ADCB_INT_baseAnalog to Digital Converter Port B INT base
0x056IVEC_PORTE_INT_basePort E INT base
0x05AIVEC_TWIE_INT_baseTwo-Wire Interface on Port E INT base
0x05EIVEC_TIMERE0_INT_baseTimer/Counter 0 on port E Interrupt base
0x074IVEC_USARTE0_INT_baseUSART 0 on port E Interrupt base
0x07AIVEC_USARTE1_INT_baseUSART 1 on port E Interrupt base
0x080IVEC_PORTD_INT_basePort D INT base
0x084IVEC_PORTA_INT_basePort A INT base
0x088IVEC_ACA_INT_baseAnalog Comparator Port A INT base
0x08EIVEC_ADCA_INT_baseAnalog to Digital Converter Port A INT base
0x096IVEC_TWID_INT_baseTwo-Wire Interface on Port D INT base
0x09AIVEC_TIMERD0_INT_baseTimer/Counter 0 on po rt D Interrupt base
0x0A6IVEC_TIMERD1_INT_baseTimer/Counter 1 on po rt D Interrupt base
0x0AEIVEC_SPID_INT_vectorSPI D Interrupt vector
ATxmega A4
8069A–AVR–02/08
21
ATxmega A4
14. I/O Ports
14.1Features
14.2Overview
• Selectable input and output configuration for each pin indi vidually
• Flexible pin configuration through dedicated Pin Configuration Register
• Synchronous and/or asynchronous input sensing with port interrupts and events
– Sense both edges
– Sense rising edges
– Sense falling edges
– Sense low level
• Asynchronous wake-up signalling
• Highly configurable output driver and pull settings:
• Configuration of multiple pins in a single operation
• Read-Modify-Write (RMW) support
• Toggle/clear/set registers for OUT and DIR registers
• Clock output on port pin
• Event Channel 7 output on port pin
• Mapping of port registers (virtual ports) into bit accessible I/O memory space
The XMEGA A4 has flexible General Purpose I/O (GPIO) Ports. A port consists of up to 8 pins,
ranging from pin 0 to pin 7. The ports implement severa l funct io ns, including inte rrup ts, synchronous/asynchronous input sensing and configurable output settings. All functions are individual
per pin, but several pins may be configured in a single operation.
14.3I/O configuration
All port pins have programmable output configuration. In addition, all GPIO pins have inverted
I/O. For an input, this means inverting the signal between the port pin and the pin register. For
an output, this means inverting the output signal between the port register and the port pin.
Some port pins also have configurable slew rate limitation to reduce electromagnetic emission.
22
8069A–AVR–02/08
14.3.1Push-pull
ATxmega A4
Figure 14-1. I/O configuration - Totem-pole
DIRn
14.3.2Pull-down
14.3.3Pull-up
OUTn
INn
Figure 14-2. I/O configuration - Totem-pole with pull-down (on input)
DIRn
OUTn
INn
Figure 14-3. I/O configuration - Totem-pole with pull-up (on input)
Pn
Pn
14.3.4Bus-keeper
8069A–AVR–02/08
DIRn
OUTn
Pn
INn
The bus-keeper’s weak output produces the same logical level as the last output level. It acts as
a pull-up if the last level was ‘1’, and pull-down if the last level was ‘0’.
23
ATxmega A4
Figure 14-4. I/O configuration - Totem-pole with bus-keeper
DIRn
14.3.5Others
OUTn
INn
Figure 14-5. Output configuration - Wired-OR with optional pull-down
OUTn
INn
Figure 14-6. I/O configuration - Wired-AND with optional pull-up
Pn
Pn
24
INn
Pn
OUTn
8069A–AVR–02/08
14.4Input sensing
ATxmega A4
• Sense both edges
• Sense rising edges
• Sense falling edges
• Sense low level
The basic input sensing may be synchronous or asynchronous and is built on the configuration
shown in Figure 14-7 on page 25.
Figure 14-7. Input sensing system overview
Asynchronous sensing
14.5Port Interrupt
Pn
INVERTED I/O
Synchronizer
INn
Q
Q
D
D
R
R
EDGE
DETECT
Synchronous sensing
EDGE
DETECT
Interrupt
Control
IREQ
Event
In addition, all GPIO pins may be configured as inverted I/O, meaning that the pin value is
inverted before sensing.
Ports can have pin-change interrupts an d external interrupts. Each po rt supports being the
source of two interrupts, and each pin may be configured individually or grouped. Each of the
interrupts may be given a specific priority and given specific sense configuration.
8069A–AVR–02/08
25
ATxmega A4
15. T/C - 16-bits Timer/Counter with PWM
15.1Features
• 3 Timer/Counter 0 (Timer0)
• 2 Timer/Counter 1 (Timer1)
• T rue 16-bit Design
• Double Buffered Timer Period Setting
• Compare or Capture Channels are Double Buffered
• 4 Combined Compare or Capture (CC) Channels in Timer0
• 2 Combined Compare or Capture (CC) Channels in Timer1
• Waveform Generation:
– Single Slope Pulse Width Modulation
– Dual Slope Pulse Width Modulation
– Frequency Generation
• Input Capture:
– Input Capture with Noise Cancelling
– Frequency Capture
– Pulse width capture
– 32-bit input capture
• Event Counter with Direction Control
• Timer Overflow and Timer Error Interrupts and Events
• One Compare Match or Capture Interrupt and Event per CC Channel
• Supports DMA Operation
• Hi-Resolution Extension (Hi-Res)
• Advanced Waveform Extension (AWEX)
15.2Overview
XMEGA A4 has 5 Timer/Counters. 3 are of type Timer0 and 2 of type Timer1. The difference
between Timer0 and Timer1 type is that Timer0 has 4 Compare/Capture channels, and Timer1
only has 2. In addition, Timer0 may have an Advanced Waveform extension (AWEX), that is not
available in Timer1.
The Timer/Counters (T/C) are 16-bit wide and can count any clock, event or input signal in the
microcontroller. A programmable prescaler is available to get a useful T/C reso lution. Upd ates of
Timer and Compare registers are double buffered to ensure glitch free operation. Using Compare channels many different waveforms can be genera ted, single slope PWM, du al slope PWM
and frequency generation.
The Hi-Resolution Extension can be enabled to increase the waveform generation resolution by
2 bits (4x). This is available for all Timer/Counters.
The Input Capture has a noise canceller to avoid incorrect ca pture of the T/C. Any input pin or
event in the microcontroller can be used to trigger the capture.
A wide range of interrupt or event sources are availa ble, including T/C overflow, Compa re match
and Capture for each timer and CC channel.
PORTC and PORTD each has one Timer/Counter 0 and one Timer/Counter 1. PORTE has one
Timer/Counter 0. Notation of these timers are TCC0, TCC1, TCD0, TCD1, and TCE0.
26
8069A–AVR–02/08
16. AWEX - Advanced Waveform Extension
16.0.1Features
4-DTI Units (8-pin)
•
• 8-bit Resolution
• Separate High and Low Side Dead-Time Setting
• Double Buffered Dead-Time
• Fault Protection (Event Controlled)
• Single Channel Multiple Output Operation (for BLDC control)
• Double Buffered Pattern Generation
16.1Overview
The Advanced Waveform Extention (AWEX) provides extra features to the Time/Counter in
Waveform Generation (WG) modes. AWEX enables easy and robust implementation of for
example advanced motor control (AC, BLDC, SR, and Stepper) and power control applications.
Any WG output from the Timer/Counte r 0 are split into a complimentary pair of ou tputs when a ny
AWEX feature is enabled. These output pairs go through a Dead-Time Inse rtion (DTI) unit that
enables generation of the non-inverted Low Side (LS) and inverted High Side (HS) of the WG
output with dead time insertion between LS and HS switching. The DTI outp ut will override the
normal port value according to the port override setting. Optionally the final output can be
inverted by using inverted I/O (INVEN) bit setting for port pin (Pxn).
ATxmega A4
The Pattern Generation unit can be used to generate a synchronized bit pattern on the port it is
connected to. In addition, the waveform generator output from the Compare Channel A can be
distributed to and override all the port pins. When the Pattern generator unit is enabled the DTI
unit i bypassed.
The Fault Protection unit is connected to the Event System, enabling any event to trigger a fault
condition that will disable the AWEX output.
The AWEX is only available on TCC0 and TCE0. The notation of these are AWEXC and
AWEXE.
8069A–AVR–02/08
27
ATxmega A4
17. RTC - Real-Time Counter
17.1Features
• 16-bit Timer
• Flexible Tick resolution ranging from 1 Hz to 32 kHz
• 1 Compare register
• 1 T op Value register
• Clear timer on Overflow or Compare Match
• Overflow or Compare Match event and interrupt generation
17.2Overview
The XMEGA A4 includes a 16-bit Real-time Counter (RTC). The RTC can be clocked from a
accurate 32.768 kHz Crystal Oscillator, the 32 kHz Calibrated Internal Oscillator, or from the 32
kHz Ultra Low Power Internal Oscillator. The RTC include both a Period and Compare register,
for details, see Figure 17-1 on page 28.
A wide range of Resolution and Time-out periods can be conf igure d usin g the RTC. With a maximum resolution of 30.5 µs, time-out periods range up to 2000 seconds. With a resolution of 1
second, maximum time-out period is over 18 hours (65536 se conds).
Figure 17-1. Real-time Counter overview
32 kHz
10-bit
prescaler
1 kHz
16-bit Top Value
Overflow
=
16-bit Timer
=
Compare Match
16-bit Compare
28
8069A–AVR–02/08
18. TWI - Two-Wire Interface
18.1Features
• 3 Identical TWI peripherals
• Simple yet Powerfu l an d Flexible Communication Interface
• Both Master and Slave Operation Supported
• Device can Operate as Transmitter or Receiver
• 7-bit Address Space Allows up to 128 Different Slave Addresses
• Multi-master Arbitration Support
• Up to 400 kHz Data Transfer Speed
• Slew-rate Limited Output Drivers
• Noise Suppression Circuitry Rejects Spikes on Bus Lines
• Fully Programmable Slave Address with General Call Support
• Address Recognition Causes Wake-up when in Sleep Mode
2
• I
C and System Management Bus (SMBus) compliant
18.2Overview
The Two-wire Interface (TWI) is a bi-directional bus with only two lines, the clock (SCL) and the
data (SDA). The protocol makes it possible to interconnect up to 128 individually addressable
devices. Since it is a multi-master bus, one or more devices capab le of taking cont rol of th e bus,
can be connected.
ATxmega A4
The only external hardware needed to implement the bus is a single pull-up resistor for each of
the TWI bus lines. Mechanisms for resolving bus contention are inherent in the TWI protocol.
PORTC, PORTD, and PORTE each have one TWI. Notation of these peripherals are TWIC,
TWID, and TWIE.
8069A–AVR–02/08
29
ATxmega A4
19. SPI - Serial Peripheral Interface
19.1Features
• 2 Identical SPI peripherals
• Full-duplex, Three-wire Synchronous Data Transfer
• Master or Slave Operation
• LSB First or MSB First Data Transfer
• Seven Programmable Bit Rates
• End of Transmission Interrupt Flag
• Write Collision Flag Protection
• Wake-up from Idle Mode
• Double Speed (CK/2) Master SPI Mode
19.2Overview
The Serial Peripheral Interface (SPI) allows high-speed synchronous data transfer between different devices. Devices can communicate using a master-slave scheme, and data a re
transferred both to and from the devices simultaneously.
PORTC and PORTD each have one SPI. Notation of these peripherals are SPIC and SPID.
30
8069A–AVR–02/08
20. USART
20.1Features
20.2Overview
ATxmega A4
• 5 Identical USART peripherals
• Full Duplex Operation (Independent Serial Receive and Transmit Registers)
• Asynchronous or Synchronous Operation
• Master or Slave Clocked Synchronous Operation
• High-resolution Arithmetic Baud Rate Generator
• Supports Serial Frames with 5, 6, 7, 8, or 9 Data Bits and 1 or 2 Stop Bits
• Odd or Even Parity Generation and Parity Check Supported by Hardware
• Data OverRun Detection
• Framing Error Detection
• Noise Filtering Includes False Start Bit Detection and Digital Low Pass Filter
• Three Separate Interrupts on TX Complete, TX Data Register Empty and RX Complete
• Multi-processor Communicat ion Mode
• Double Speed Asynchronous Communication Mode
• IrDA
The Universal Synchronous and Asynchronous serial Receiver and Transmitter (USART) provides highly flexible serial communication device. The frame format can be customized to
support a wide range of standards, and the USART implements different error detection.
PORTC and PORTD each have two USARTs. PORTE has one USART. Notation of these
peripherals are USARTC0, USARTC1, USARTD0, USARTD1, and USARTE0.
8069A–AVR–02/08
31
ATxmega A4
21. IRCOM - IR Communication Module
21.1Features
• Pulse modulation/demodulation for infrared communication
• IrDA 1.4 Compatible for baud rates up to 115.2 kbps
• Selectable pulse modulation scheme
– 3/16 of baud rate period
– Fixed pulse period, 8-bit programmable
– Pulse modulation disabled
• Built in filtering
• Can be connected to and used by any USART and one USART at the time
21.2Overview
XMEGA contains an Infrared Communication Module (IRCOM) IrDA 1.4 compatible module for
baud rates up to 115.2 kbps. This supports three modulat ion sch emes: 3/ 16 of baud rate pe rio d,
fixed programmable pulse time based on the Peripheral Clock speed , or pulse modulation disabled. There is one IRCOM available, and this can be connected to any USART to enable
infrared pulse coding/decoding for that USART.
32
8069A–AVR–02/08
22. Crypto Engine
22.1Features
22.2Overview
ATxmega A4
• Data Encryption Standard (DES) CPU instruction
• Advanced Encryption Standard (AES) crypto module
• DES Instruction
– Encryption and Decryption
– DES and triple-DES supported
– Single-cycle DE S instruction
– Encryption/Decryption in 16 clock cycles per 8-byte block
• AES Crypto Module
– Encryption and Decryption
– Support 128-bit keys
– Support XOR data load mode to the State memory
– Encryption/Decryption in 375 clock cycles per 16-byte block
The Advanced Encryption Standard (AES) and Data Encryption Standard (DES) are two commonly used standards for encryption. These are supported through an AES peripheral module
and a DES core instruction.
DES is supported by a DES instruction in the AVR XMEGA CPU. The 8-byte key and 8-byte
data blocks must be loaded into the Register file, and then DES must be executed 16 times to
encrypt/decrypt the data block.
The AES Crypto Module encrypts and decrypts 128-bit dat a blocks with the use of a 12 8-bit key.
The key and data must be loaded into the module before encryption/decryption is started. It
takes 375 peripheral clock cycles before encrypted/decrypted data can be read ou t.
8069A–AVR–02/08
33
ATxmega A4
23. ADC - 12-bit Analog to Digital Converter
23.1Features
• Two ADCs with 12-bit resolution
• 2 Msps conversion rate for each ADC
• Signed- and Unsigned conversions
• 4 result registers with individual input channel control for each ADC
• 8 single ended inputs for each ADC
• 8x4 differential inputs for each ADC
• Gain of 1, 2, 4, 8, 16, 32 or 64
• Selectable accuracy of 8- or 12-bit.
• Built-in Gain Calibration
• Internal- or External Reference selection
• Event triggered conversion for accurate timing
• DMA transfer of conversion results
• Interrupt/Event on compare result
23.2Overview
The XMEGA A4 devices has two Analog to Digital Converters (ADC), see Figure 23-1 on page
35. The two ADC modules can be operated simultaneously, individually or synchronized.
The ADC converts analog voltages to digital values.The ADC has 12-bit resolution and is capable of converting up to 2 million samples per second. The input selection is flexible, and both
single-ended and differential measurements can be done. The ADC provides both signed and
unsigned results, and an optional gain stage is available to increase the dynamic range of the
ADC.
The ADC uses Successive Approximation Result (SAR) ADC . A SAR ADC meas ures one bi t of
the conversion result a time. The ADC has a pipe line architectu re. This means that a new analog
voltage can be sampled and a new ADC measurement started while other ADC measurements
are ongoing.
ADC measurements can either be started by the application software or an incoming event from
another peripheral in the device. Four different result registers with individual channel selection
(MUX registers) are provided to make it easier for the application to keep track of the data. It is
also possible to use DMA to move ADC results directly to memory or peripherals.
Both internal and external analog reference voltages can be used. A very accurate internal 1.0V
reference is available, providing a conversion range from 0 - 1.0 V in unsigne d mode and -1.0 to
1.0V in signed mode.
34
8069A–AVR–02/08
Figure 23-1. ADC overview
Channel A MUX selection
Channel B MUX selection
Channel C MUX selection
Channel D MUX selection
ATxmega A4
Internal inputs
Pin inputsPin inputs
1-64 X
Configuration
Reference selection
ADC
Event
Trigger
Channel A
Register
Channel B
Register
Channel C
Register
Channel D
Register
Each ADC has 4 registers defining a MUX selection with a corresponding result register. This
means that 4 channels may be sampled within 1.5 µs without any intervention by the ap plication
other than starting the conversion, and the result will be available in 4 data registers.
The ADC may be configured to make 8-, 10- or 12-bit results, reducing the conversion time
(propagation delay) from 5.3 µs for 12-bit to 3.1 µs for 8-bit resolution.
ADC conversion results are provided left- or right adjusted with optional ‘1’ or ‘0’ padding. This
eases calculation when the result is represented as a signed integer (signed 16-bit number).
PORTA and PORTB each have one ADC. Notation of these peripherals are ADCA and ADCB.
8069A–AVR–02/08
35
ATxmega A4
24. DAC - 12-bit Digital to Analog Converter
24.1Features
• One DAC with 12-bit resolution
• Up to 1 Msps conversion rate for each DAC
• Flexible conversion range
• Multiple trigger sources
• 1 continuous time or 2 Sample and Hold (S/H) outputs for each DA C
• Built-in offset and gain calibration
• High drive capabilities
• DAC Power reduction mode
24.2Overview
The XMEGA A4 features one 12-bit, 1 Msps DAC with built-in calibration of offset and gain, see
Figure 24-1 on page 36.
A DAC converts a digital value into an analog signal. The DAC ma y use the bandg ap referenc e
voltage as upper limit for conversion, but it is also possible to use the supply voltage or any
applied voltage in-between. An external reference input is shared with the ADC reference input.
Figure 24-1. DAC overview
Reference selection
Configuration
Channel A
Register
DAC
Channel B
Register
Event
Trigger
Channel A
Channel B
The DAC has one continuous output with high drive capabilities for both resistive and capacitive
loads. It is also possible to split the continuous time channel into two Sample and Hold (S/H)
channels; each with separate data conversion registers.
A DAC conversion may be started from the application software by writing the data conversion
registers. The DAC may also be configured to do conversions triggered by the Event System to
have regular timing independent of the application. DMA may be used for transferring data from
memory location to DAC data registers.
The DAC has a built-in calibration system that removes offset and gain error.
The DAC belongs to PORTB. Notation of this peripheral is DACB.
36
8069A–AVR–02/08
25. AC - Analog Comparator
25.1Features
• Two Analog Comparators
• Selectable Power vs. Speed
– 20 µA/500 ns active current consumption/propagation delay or
– 130 µA/30 ns active current consumption/propagation delay
• Selectable hysteresis
– 0, 20 mV, 50 mV
• Analog Comparator output available on pin
• Flexible Input Selection
• Basic interrupt and event generation on
– Rising edge
– Falling edge
–Toggle
• Window function interrupt and event generation on
– Signal above window
– Signal inside window
– Signal below window
25.2Overview
ATxmega A4
The XMEGA A4 features four An alog Com parators (AC). An An alog Comp arator com pares tw o
voltages, and the output indicates which input is largest. T he Analog Comparat or may be co nfigured to give interrupt requests and/or events upon several different combinations of input
change.
Both hysteresis and propagation delays may be adjusted in order to find the optimal operation
for each application.
The Analog Comparators are always grouped in pairs (AC0 and AC1) on each analog port. They
have identical behavior but separate control regi sters
The AC belongs to PORTA. Notations are ACA0 and ACA1.
Figure 25-1. Analog comparator overview
Pin inputs
Internal inputs
Scaled inputs
Pin inputs
Internal inputs
Interrupt
sensitivity
control
+
-
Interrupts
Events or
pin output
8069A–AVR–02/08
Scaled inputs
37
ATxmega A4
25.3Input Selection
The Analog comparators have a very flexible input selection and the two comparators grouped
in a pair may be used to realize a window function. One pair of analog comparators is shown in
Figure 25-1 on page 37.
•
Input selection from pin
• Internal signals available on both analog comparator inputs
• 6-bit scale down of VCC, available on both analog comparator inputs
25.4Window Function
The window function is realized by connecting the inputs of th e two analog comp arat ors in a pair
as shown in Figure 25-2 on page 38.
Figure 25-2. Analog comparator window function
– Pin 0, 1, 2 selectable to positive input of analog comparator
– Pin 0, 1, 3 selectable to negative input of analog comparator
– Bandgap Reference voltage
– Output from 12-bit DAC
+
AC0
Upper limit of window
Input signal
Interrupt
sensitivity
control
Interrupts
Events
Lower limit of window
+
AC1
-
38
8069A–AVR–02/08
26. OCD - On-chip Debug
26.1Features
• Complete Program Flow Control
– Symbolic Debugging Support in Hardware
– Go, Stop, Reset, Step into, Step over, Step out, Run-to-Cursor
• 1 dedicated program address breakpoint or symbolic breakpoi nt for AVR studio/emulator
• 4 Hardware Breakpoints
• Unlimited Number of User Program Breakpoints
• Uses CPU for Accessing I/O, Data, and Program
• Non-Intrusive Operation
– Uses no hardware or software resources
• High Speed Operation
– No limitation on frequency of TCK versus system clock frequency
26.2Overview
The XMEGA A4 has an On-chip debug (OCD) system that - in combination with Atmel’s development tools - provides all the necessary functions to debug an application.
ATxmega A4
8069A–AVR–02/08
39
ATxmega A4
27. Program, Debug and Test Interfaces
27.1Features
• PDI - Program and Debug Interface (Atmel proprietary 2-pin interface)
• Access to the OCD system
• Programming of Flash, EEPROM, Fuses and Lock Bits
27.2Overview
The PDI is the physical interface to access the debug facilities. When used, the PDI make use of
2 pins.
27.3PDI - Program and Debug Interface
The PDI is an Atmel proprietary protocol for communication between the microcontroller and
Atmel’s development tools.
40
8069A–AVR–02/08
28. Pinout
The pinout of XMEGA A4 is shown in ”Block Diagram/Pinout” on page 2. In addition to general
I/O functionality, each pin may have several function. This will depend on which peripheral is
enabled and connected to the actual pin. Only one of the alternate pin functions can be used at
the time.
28.1Alternate Pin Functions Description
The tables below shows the notation for all pin functions available and describe its function.
28.1.1Operation/Power Supply
VCCDigital supply voltage
AVCCAnalog supply voltage
GNDGround
28.1.2Analog functions
ACxnAnalog Comparator input port x pin y
ADCnAnalog to Digital Converter input port x pin y
ATxmega A4
DACnDigital to Analog Converter output port x pin y
AREFxAnalog Reference input port x pin
28.1.3Timer functions
OCnxOutput Compare Channel x for Timer n
_OCnxInverted Output Compare Channel x for Timer n
28.1.4Communication functions
SCLSerial Clock for TWI
SDASerial Data for TWI
XCK0Tr ansfer Clock for USART n
RxD0Receiver Data for USART n
TxD0Transmitter Data for USART n
_SSSlave Select for SPI
MOSIMaster Out Slave In for SPI
MISOMaster In Slave Out f o r SPI
SCKSerial Clock for SPI
8069A–AVR–02/08
41
ATxmega A4
28.1.5Oscillators
TOSCnTimer Oscillator pin x
XTALnIn put/Output to inverting Oscillator
28.1.6DEBUG/SYSTEM functions
TESTTest pin
PROGProgramming pin
RESETReset pin
PDI_CLKProgram and Debug Interface Clock
PDI_DATAProgram and Debug Interface Data
28.2Alternate Pin Functions
The tables below shows the main and alternate pin functions for all pins on each port. It also
shows which peripheral which make use of or enable the alte rnate pin function.
Table 28-1.Port A - Alternate functions
PORT APIN #INTERRUPTADCA POSADCA NEG
GND38
AVCC39
PA040SYNCADC0ADC0ADC0AC0AC0AREFA
PA141SYNCADC1ADC1ADC1AC1AC1
PA242SYNC/ASYNCADC2ADC2ADC2AC2DAC0
PA343SYNCADC3ADC3ADC3AC3AC3DAC1
PA444SYNCADC4ADC4ADC4AC4
PA51SYNCADC5ADC5ADC5AC5AC5
PA62SYNCADC6ADC6ADC6AC6
PA73SYNCADC7ADC7ADC7AC7AC0 OUT
The address maps shows the base address for each peripheral and module in XMEGA A4. For
complete register description and summa ry for each peripheral modu le, refer to the XMEGA A
Manual.
Base AddressNameDescription
0x0000GPIOGeneral Purpose IO Registers
0x0010VPORT0Virtual Port 0
0x0014VPORT1Virtual Port 1
0x0018VPORT2Virtual Port 2
0x001CVPORT3Virtual Port 2
0x0030CPUCPU
0x0040CLKClock Control
0x0048SLEEPSleep Controller
0x0050OSCOscillator Control
0x0060DFLLRC32MDFLL for the 32 MHz Internal RC Oscillator
0x0068DFLLRC2MDFLL for the 2 MHz RC Oscillator
0x0070PRPower Reduction
0x0078RSTReset Controller
0x0080WDTWatch-Dog Timer
0x0090MCUMCU Control
0x00A0PMICProgrammable MUltilevel Interrupt Controller
0x00B0PORTCFGPort Configuration
0x00C0AESAES Module
0x0100DMADMA Controller
0x0180EVSYSEvent System
0x01C0NVMNon Volatile Memory (NVM) Controller
0x0200ADCAAnalog to Digital Converter on port A
0x0240ADCBAnalog to Digital Converter on port B
0x0320DACBDigital to Analog Converter on port B
0x0380ACAAnalog Comparator pair on port A
0x0400RTCReal Time Counter
0x0480TWICTwo Wire Interface on port C
0x0490TWIDTwo Wire Interface on port D
0x04A0TWIETwo Wire Interfaceon port E
0x0600PORTAPort A
0x0620PORTBPort B
0x0640PORTCPort C
0x0660PORTDPort D
0x0680PORTEPort E
0x07E0PORTRPort R
0x0800TCC0Timer/Counter 0 on port C
0x0840TCC1Timer/Counter 1 on port C
0x0880AWEXCAdvanced Waveform Extension on port C
0x0890HIRESCHigh Resolution Extension on port C
0x08A0USARTC0USART 0 on port C
0x08B0USARTC1USART 1 on port C
0x08C0SPICSerial Peripheral Interface on port C
0x08F8IRCOMInfrared Communication Module
0x0900TCD0Timer/Counter 0 on port D
0x0940TCD1Timer/Counter 1 on port D
0x0990HIRESDHigh Resolution Extension on port D
0x09A0USARTD0USART 0 on port D
0x09B0USARTD1USART 1 on port D
0x09C0SPIDSerial Peripheral Interface on port D
0x0A00TCE0Timer/Counter 0 on port E
0x0A80AWEXEAdvanced Waveform Extensionon port E
0x0A90HIRESEHigh Resolution Extension on port E
0x0AA0USARTE0USART 0 on port E
48
8069A–AVR–02/08
32. Packaging information
32.144A
PIN 1
PIN 1 IDENTIFIER
ATxmega A4
B
e
E1E
D1
D
C
0˚~7˚
A1
L
Notes:1. This package conforms to JEDEC reference MS-026, Variation ACB.
2. Dimensions D1 and E1 do not include mold protrusion. Allowable
protrusion is 0.25 mm per side. Dimensions D1 and E1 are maximum
plastic body size dimensions including mold mismatch.
3. Lead coplanarity is 0.10 mm maximum.
A2A
SYMBOL
COMMON DIMENSIONS
(Unit of Measure = mm)
MIN
A––1.20
A10.05–0.15
A2 0.951.001.05
D11.7512.0012.25
D19.9010.0010.10Note 2
E11.7512.0012.25
E19.9010.0010.10Note 2
B 0.30–0.45
C0.09–0.20
L0.45– 0.75
e0.80 TYP
NOM
MAX
NOTE
2325 Orchard Parkway
R
San Jose, CA 95131
8069A–AVR–02/08
TITLE
44A, 44-lead, 10 x 10 mm Body Size, 1.0 mm Body Thickness,
0.8 mm Lead Pitch, Thin Profile Plastic Quad Flat Package (TQFP)
10/5/2001
DRAWING NO.
44A
REV.
B
49
ATxmega A4
32.244M1
D
Marked Pin# 1 ID
E
SEATING PLANE
TOP VIEW
K
L
D2
Pin #1 Corner
1
2
3
Option A
E2
Option B
K
b
e
Option C
BOTTOM VIEW
Note: JEDEC Standard MO-220, Fig. 1 (SAW Singulation) VKKD-3.
Pin #1
Triangle
Pin #1
Chamfer
(C 0.30)
Pin #1
Notch
(0.20 R)
A1
A3
A
SIDE VIEW
COMMON DIMENSIONS
(Unit of Measure = mm)
SYMBOL
A 0.80 0.90 1.00
A1 – 0.02 0.05
A3 0.25 REF
b 0.180.230.30
D
D2 5.005.205.40
E
E2 5.005.205.40
e 0.50 BSC
L 0.59 0.64 0.69
K0.200.260.41
MIN
6.907.007.10
6.907.007.10
NOM
MAX
NOTE
2325 Orchard Parkway
R
San Jose, CA 95131
50
TITLE
44M1, 44-pad, 7 x 7 x 1.0 mm Body, Lead Pitch 0.50 mm,
5.20 mm Exposed Pad, Micro Lead Frame Package (MLF)
Table of Contents.......................................................................................i
iv
8069A–AVR–02/08
ATxmega A4
8069A–AVR–02/08
v
HeadquartersInternational
Atmel Corporation
2325 Orchard Parkway
San Jose, CA 95131
USA
Tel: 1(408) 441-0311
Fax: 1(408) 487-2600
Atmel Asia
Room 1219
Chinachem Golden Plaza
77 Mody Road Tsimshatsui
East Kowloon
Hong Kong
Tel: (852) 2721-9778
Fax: (852) 2722-1369
Product Contact
Web Site
www.atmel.com
Literature Requests
www.atmel.com/literature
Atmel Europe
Le Krebs
8, Rue Jean-Pierre Timbaud
BP 309
78054 Saint-Quentin-enYvelines Cedex
France
Tel: (33) 1-30-60-70-00
Fax: (33) 1-30-60-71-11
Technical Support
avr@atmel.com
Atmel 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
Sales Contact
www.atmel.com/contacts
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 i n 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 INCIDENT AL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTI ON, OR L OSS 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 here in. 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 suppor t or sustain life.