– Seven External Interrupts, Including a High-priority, Low-latency Interrupt Request
• Fifty-eight Programmable I/O Lines
• 6-channel 16-bit Timer/Counter
– Six External Clock Inputs and Two Multi-purpose I/O Pins per Channel
• Three USARTs
• Master/Slave SPI Interface
– 8-bit to 16-bit Programmable Data Length
– Four External Slave Chip Selects
• Programmable Watchdog Timer
• 8-channel 10-bit ADC
• 2-channel 10-bit DAC
• Clock Generator with On-chip Main Oscillator and PLL for Multiplication
– 3 to 20 MHz Frequency Range Main Oscillator
• Real-time Clock with On-chip 32 kHz Oscillator
– Battery Backup Operation and External Alarm
• 8-channel Peripheral Data Controller for USARTs and SPIs
• Advanced Power Management Controller (APMC)
– Normal, Wait, Slow, Standby and Power-down modes
• IEEE 1149.1 JTAG Boundary-scan on all Digital Pins
• Fully Static Operation: 0 Hz to 33 MHz
• 2.7V to 3.6V Core Operating Range
• 2.7V to 5.5V I/O Operating Range
• 2.7V to 3.6V Analog Operating Range
• 1.8V to 3.6V Backup Battery Operating Range
• 2.7V to 3.6V Oscillator and PLL Operating Range
• -40°C to +85°C Temperature Range
• Available in a 176-lead LQFP or 176-ball BGA Package
®
ARM® Thumb® Processor Core
AT91
ARM
®
Thumb®
Microcontrollers
AT91M55800A
1.Description
The AT91M55800A is a member of the Atmel AT91 16/32-bit microcontroller family,
which is based on the ARM7TDMI processor core. This processor has a high-performance 32-bit RISC architecture with a high-density 16-bit instruction set and very low
power consumption. In addition, a large number of internally banked registers result in
very fast exception handling, making the device ideal for real-time control
applications.
The fully programmable External Bus Interface provides a direct connection to off-chip
memory in as fast as one clock cycle for a read or write operation. An eight-level prior-
Rev. 1745D–ATARM–04-Nov-05
ity vectored interrupt controller in conjunction with the peripheral data controller significantly improve the real-time
performance of the device.
The device is manufactured using Atmel’s high-density CMOS technology. By combining the ARM7TDMI processor core
with an on-chip SRAM, a wide range of peripheral functions, analog interfaces and low-power oscillators on a monolithic
chip, the Atmel AT91M55800A is a powerful microcontroller that provides a highly-flexible and cost-effective solution to
many ultra low-power applications.
2
AT91M55800A
1745D–ATARM–04-Nov-05
AT91M55800A
2.Pin Configurations
Table 2-1.Pin Configuration for 176-lead LQFP Package
The AT91M55800A microcontroller integrates an ARM7TDMI with its embedded ICE interface, memories and peripherals. Its architecture consists of two main buses, the Advanced
System Bus (ASB) and the Advanced Peripheral Bus (APB). Designed for maximum performance and controlled by the memory controller, the ASB interfaces the ARM7TDMI processor
with the on-chip 32-bit memories, the External Bus Interface (EBI) and the AMBA
The AMBA Bridge drives the APB, which is designed for accesses to on-chip peripherals and
optimized for low power consumption.
The AT91M55800A microcontroller implements the ICE port of the ARM7TDMI processor on
dedicated pins, offering a complete, low cost and easy-to-use debug solution for target
debugging.
5.1Memory
The AT91M55800A microcontroller embeds 8K bytes of internal SRAM. The internal memory
is directly connected to the 32-bit data bus and is single-cycle accessible.
The AT91M55800A microcontroller features an External Bus Interface (EBI), which enables
connection of external memories and application-specific peripherals. The EBI supports 8- or
16-bit devices and can use two 8-bit devices to emulate a single 16-bit device. The EBI implements the early read protocol, enabling faster memory accesses than standard memory
interfaces.
™
Bridge.
5.2Peripherals
The AT91M55800A microcontroller integrates several peripherals, which are classified as system or user peripherals. All on-chip peripherals are 32-bit accessible by the AMBA Bridge, and
can be programmed with a minimum number of instructions. The peripheral register set is
composed of control, mode, data, status and enable/disable/status registers.
An on-chip, 8-channel Peripheral Data Controller (PDC) transfers data between the on-chip
USARTs/SPI and the on and off-chip memories without processor intervention. One PDC
channel is connected to the receiving channel and one to the transmitting channel of each
USART and of the SPI.
Most importantly, the PDC removes the processor interrupt handling overhead and significantly reduces the number of clock cycles required for a data transfer. It can transfer up to 64K
contiguous bytes. As a result, the performance of the microcontroller is increased and the
power consumption reduced.
5.2.1System Peripherals
The External Bus Interface (EBI) controls the external memory and peripheral devices via an
8- or 16-bit data bus and is programmed through the APB. Each chip select line has its own
programming register.
The Advanced Power Management Controller (APMC) optimizes power consumption of the
product by controlling the clocking elements such as the oscillators and the PLL, system and
user peripheral clocks, and the power supplies.
10
The Advanced Interrupt Controller (AIC) controls the internal interrupt sources from the internal peripherals and the eight external interrupt lines (including the FIQ), to provide an interrupt
and/or fast interrupt request to the ARM7TDMI. It integrates an 8-level priority controller and,
using the Auto-vectoring feature, reduces the interrupt latency time.
AT91M55800A
1745D–ATARM–04-Nov-05
5.2.2User Peripherals
AT91M55800A
The Real-time Clock (RTC) peripheral is designed for very low power consumption, and combines a complete time-of-day clock with alarm and a two-hundred year Gregorian calendar,
complemented by a programmable periodic interrupt.
The Parallel Input/Output Controllers (PIOA and PIOB) control the 58 I/O lines. They enable
the user to select specific pins for on-chip peripheral input/output functions, and general-purpose input/output signal pins. The PIO controllers can be programmed to detect an interrupt
on a signal change from each line.
The Watchdog (WD) can be used to prevent system lock-up if the software becomes trapped
in a deadlock.
The Special Function (SF) module integrates the Chip ID and Reset Status registers.
Three USARTs, independently configurable, enable communication at a high baud rate in synchronous or asynchronous mode. The format includes start, stop and parity bits and up to 8
data bits. Each USART also features a Timeout and a Time Guard Register, facilitating the
use of the two dedicated Peripheral Data Controller (PDC) channels.
The six 16-bit Timer/Counters (TC) are highly programmable and support capture or waveform
modes. Each TC channel can be programmed to measure or generate different kinds of
waves, and can detect and control two input/output signals. Each TC also has three external
clock signals.
The SPI provides communication with external devices in master or slave mode. It has four
external chip selects which can be connected to up to 15 devices. The data length is programmable, from 8- to 16-bits.
The two identical 4-channel 10-bit analog-to-digital converters (ADC) are based on a Successive Approximation Register (SAR) approach.
External memory interface mapping
Peripheral operations
Peripheral user interfaces
Ordering information
Packaging information
Soldering profile
Errata
DC Characteristics
Power consumption
Thermal and reliability coniderations
AC characteristics
Product overview
Ordering information
Packaging information
Soldering profile
ARM7TDMI (Thumb) Datasheet0673
AT91M55800A Datasheet (This document)1745
AT91M55800A Electrical Characteristics 1727
AT91M55800A Summary Datasheet 1745S
Literature
Number
12
AT91M55800A
1745D–ATARM–04-Nov-05
7.Product Overview
7.1Power Supplies
The AT91M55800A has 5 kinds of power supply pins:
• VDDCORE pins, which power the chip core
• VDDIO pins, which power the I/O Lines
• VDDPLL pins, which power the oscillator and PLL cells
• VDDA pins, which power the analog peripherals ADC and DAC
• VDDBU pins, which power the RTC, the 32768 Hz oscillator and the Shut-down Logic of
VDDIO and VDDCORE are separated to permit the I/O lines to be powered with 5V, thus
resulting in full TTL compliance.
The following ground pins are provided:
• GND for both VDDCORE and VDDIO
• GNDPLL for VDDPLL
•GNDA for VDDA
• GNDBU for VDDBU
All of these ground pins must be connected to the same voltage (generally the board electric
ground) with wires as short as possible. GNDPLL, GNDA and GNDBU are provided separately in order to allow the user to add a decoupling capacitor directly between the power and
ground pads. In the same way, the PLL filter resistor and capacitors must be connected to the
device and to GNDBU with wires as short as possible. Also, the main oscillator crystal and the
32768 Hz crystal external load capacitances must be connected respectively to GNDPLL and
to GNDBU with wires as short as possible.
AT91M55800A
the APMC
The main constraints applying to the different voltages of the device are:
• VDDBU must be lower than or equal to VDDCORE
• VDDA must be higher than or equal to VDDCORE
• VDDCORE must be lower than or equal to VDDIO
The nominal power combinations supported by the AT91M55800A are described in the following table:
Table 7-1.Nominal Power Combinations
VDDIOVDDCOREVDDAVDDPLLVDDBU
3V3V3V3V3V33 MHz
3.3V3.3V3.3V3.3V3.3V 33 MHz
5V3.3V3.3V3.3V3.3V33 MHz
7.2Input/Output Considerations
After the reset, the peripheral I/Os are initialized as inputs to provide the user with maximum
flexibility. It is recommended that in any application phase, the inputs to the AT91M55800A
microcontroller be held at valid logic levels to minimize the power consumption.
Maximum Operating
Frequency
1745D–ATARM–04-Nov-05
13
7.3Master Clock
7.4Reset
7.4.1NRST Pin
Master Clock is generated in one of the following ways, depending on programming in the
APMC registers:
• From the 32768 Hz low-power oscillator that clocks the RTC
• The on-chip main oscillator together with a PLL generate a software-programmable main
clock in the 500 Hz to 33 MHz range. The main oscillator can be bypassed to allow the user
to enter an external clock signal.
The Master Clock (MCK) is also provided as an output of the device on the pin MCKO, whose
state is controlled by the APMC module.
Reset restores the default states of the user interface registers (defined in the user interface of
each peripheral), and forces the ARM7TDMI to perform the next instruction fetch from address
zero. Aside from the program counter, the ARM7TDMI registers do not have defined reset
states.
NRST is active low-level input. It is asserted asynchronously, but exit from reset is synchronized internally to the MCK. At reset, the source of MCK is the Slow Clock (32768 Hz crystal),
and the signal presented on MCK must be active within the specification for a minimum of 10
clock cycles up to the rising edge of NRST, to ensure correct operation.
7.4.2NTRST Pin
Test Access Port (TAP) reset functionality is provided through the NTRST signal.
The NTRST control pin initializes the selected TAP controller. The TAP controller involved in
this reset is determined according to the initial logical state applied on the JTAGSEL pin after
the last valid NRST.
In either Boundary Scan or ICE Mode a reset can be performed from the same or different circuitry, as shown in Figure 7-1 below. But in all cases, the NTRST like the NRST signal, must
be asserted after each power-up. (See the AT91M55800A electrical datasheet, Atmel lit°
1727, for the necessary minimum pulse assertion time.)
Figure 7-1.Separate or Common Reset Management
Reset
Controller
Reset
Controller
NTRST
NRST
AT91M55800A
(1)(2)
Reset
Controller
NTRST
NRST
AT91M55800A
14
Notes:1. NRST and NTRST handling in Debug Mode during development.
2. NRST and NTRST handling during production.
AT91M55800A
1745D–ATARM–04-Nov-05
In order to benefit the most regarding the separation of NRST and NTRST during the Debug
phase of development, the user must independently manage both signals as shown in example (1) of Figure 7-1 above. However, once Debug is completed, both signals are easily
managed together during production as shown in example (2) of Figure 7-1 above.
7.4.3Watchdog Reset
The watchdog can be programmed to generate an internal reset. In this case, the reset has
the same effect as the NRST pin assertion, but the pins BMS and NTRI are not sampled. Boot
Mode and Tri-state Mode are not updated. If the NRST pin is asserted and the watchdog triggers the internal reset, the NRST pin has priority.
7.5Emulation Functions
7.5.1Tri-state Mode
The AT91M55800A provides a Tri-state Mode, which is used for debug purposes. This
enables the connection of an emulator probe to an application board without having to desolder the device from the target board. In Tri-state Mode, all the output pin drivers of the
AT91M55800A microcontroller are disabled.
To enter Tri-state Mode, the pin NTRI must be held low during the last 10 clock cycles before
the rising edge of NRST. For normal operation the pin NTRI must be held high during reset, by
a resistor of up to 400K Ohm.
AT91M55800A
NTRI is multiplexed with I/O line PA18 and USART 1 serial data transmit line TXD1.
Standard RS232 drivers generally contain internal 400K Ohm pull-up resistors. If TXD1 is connected to a device not including this pull-up, the user must make sure that a high level is tied
on NTRI while NRST is asserted.
7.5.2JTAG/ICE Debug Mode
ARM Standard Embedded In-Circuit Emulation is supported via the JTAG/ICE port. It is connected to a host computer via an external ICE Interface. The JTAG/ICE debug mode is
enabled when JTAGSEL is low.
In ICE Debug Mode the ARM Core responds with a non-JTAG chip ID which identifies the core
to the ICE system. This is not JTAG compliant.
7.5.3IEEE 1149.1 JTAG Boundary-scan
JTAG Boundary-scan is enabled when JTAGSEL is high. The functions SAMPLE, EXTEST
and BYPASS are implemented. There is no JTAG chip ID. The Special Function module provides a chip ID which is independent of JTAG.
It is not possible to switch directly between JTAG and ICE operations. A chip reset must be
performed (NRST and NTRST) after JTAGSEL is changed.
7.6Memory Controller
The ARM7TDMI processor address space is 4G bytes. The memory controller decodes the
internal 32-bit address bus and defines three address spaces:
1745D–ATARM–04-Nov-05
• Internal memories in the four lowest megabytes
• Middle space reserved for the external devices (memory or peripherals) controlled by the
EBI
15
7.6.1Internal Memories
7.6.2Boot Mode Select
• Internal peripherals in the four highest megabytes
In any of these address spaces, the ARM7TDMI operates in Little-Endian mode only.
The AT91M55800A microcontroller integrates an 8-Kbyte SRAM bank. This memory bank is
mapped at address 0x0 (after the remap command), allowing ARM7TDMI exception vectors
between 0x0 and 0x20 to be modified by the software. The rest of the bank can be used for
stack allocation (to speed up context saving and restoring), or as data and program storage for
critical algorithms. All internal memory is 32 bits wide and single-clock cycle accessible. Byte
(8-bit), half-word (16-bit) or word (32-bit) accesses are supported and are executed within one
cycle. Fetching Thumb or ARM instructions is supported and internal memory can store twice
as many Thumb instructions as ARM ones.
The ARM reset vector is at address 0x0. After the NRST line is released, the ARM7TDMI executes the instruction stored at this address. This means that this address must be mapped in
nonvolatile memory after the reset.
The input level on the BMS pin during the last 10 clock cycles before the rising edge of the
NRST selects the type of boot memory (see Table 7-2).
The pin BMS is multiplexed with the I/O line PB18 that can be programmed after reset like any
standard PIO line.
7.6.3Remap Command
7.6.4Abort Control
Table 7-2.Boot Mode Select
BMSBoot Mode
1External 8-bit memory on NCS0
0External 16-bit memory on NCS0
The ARM vectors (Reset, Abort, Data Abort, Prefetch Abort, Undefined Instruction, Interrupt,
Fast Interrupt) are mapped from address 0x0 to address 0x20. In order to allow these vectors
to be redefined dynamically by the software, the AT91M55800A microcontroller uses a remap
command that enables switching between the boot memory and the internal RAM bank
addresses. The remap command is accessible through the EBI User Interface, by writing one
in RCB of EBI_RCR (Remap Control Register). Performing a remap command is mandatory if
access to the other external devices (connected to chip selects 1 to 7) is required. The remap
operation can only be changed back by an internal reset or an NRST assertion.
The abort signal providing a Data Abort or a Prefetch Abort exception to the ARM7TDMI is
asserted when accessing an undefined address in the EBI address space.
No abort is generated when reading the internal memory or by accessing the internal peripherals, whether the address is defined or not.
16
AT91M55800A
1745D–ATARM–04-Nov-05
7.7External Bus Interface
The External Bus Interface handles the accesses between addresses 0x0040 0000 and
0xFFC0 0000. It generates the signals that control access to the external devices, and can
configure up to eight 16-Mbyte banks. In all cases it supports byte, half-word and word aligned
accesses.
For each of these banks, the user can program:
• Number of wait states
• Number of data float times (wait time after the access is finished to prevent any bus
contention in case the device is too long in releasing the bus)
• Data bus width (8-bit or 16-bit)
• With a 16-bit wide data bus, the user can program the EBI to control one 16-bit device
(Byte Access Select Mode) or two 8-bit devices in parallel that emulate a 16-bit memory
(Byte-write Access mode).
The External Bus Interface features also the Early Read Protocol, configurable for all the
devices, that significantly reduces access time requirements on an external device.
AT91M55800A
1745D–ATARM–04-Nov-05
17
8.Peripherals
The AT91M55800A peripherals are connected to the 32-bit wide Advanced Peripheral Bus.
Peripheral registers are only word accessible – byte and half-word accesses are not supported. If a byte or a half-word access is attempted, the memory controller automatically
masks the lowest address bits and generates a word access.
Each peripheral has a 16-Kbyte address space allocated (the AIC only has a 4-Kbyte address
space).
8.1Peripheral Registers
The following registers are common to all peripherals:
• Control Register – Write-only register that triggers a command when a one is written to the
corresponding position at the appropriate address. Writing a zero has no effect.
• Mode Register – read/write register that defines the configuration of the peripheral. Usually
has a value of 0x0 after a reset.
• Data Register – read and/or write register that enables the exchange of data between the
processor and the peripheral.
• Status Register – Read-only register that returns the status of the peripheral.
• Enable/Disable/Status Registers – shadow command registers. Writing a one in the Enable
Register sets the corresponding bit in the Status Register. Writing a one in the Disable
Register resets the corresponding bit and the result can be read in the Status Register.
Writing a bit to zero has no effect. This register access method maximizes the efficiency of
bit manipulation, and enables modification of a register with a single non-interruptible
instruction, replacing the costly read-modify-write operation.
Unused bits in the peripheral registers are shown as “–” and must be written at 0 for upward
compatibility. These bits read 0.
8.2Peripheral Interrupt Control
The Interrupt Control of each peripheral is controlled from the status register using the interrupt mask. The status register bits are ANDed to their corresponding interrupt mask bits and
the result is then ORed to generate the Interrupt Source signal to the Advanced Interrupt
Controller.
The interrupt mask is read in the Interrupt Mask Register and is modified with the Interrupt
Enable Register and the Interrupt Disable Register. The enable/disable/status (or mask)
makes it possible to enable or disable peripheral interrupt sources with a non-interruptible single instruction. This eliminates the need for interrupt masking at the AIC or Core level in realtime and multi-tasking systems.
8.3Peripheral Data Controller
An on-chip, 8-channel Peripheral Data Controller (PDC) transfers data between the on-chip
USARTs/SPI and the on and off-chip memories without processor intervention. One PDC
channel is connected to the receiving channel and one to the transmitting channel of each
USART and SPI.
The user interface of a PDC channel is integrated in the memory space of each peripheral. It
contains a 32-bit address pointer register and a 16-bit count register. When the programmed
data is transferred, an end of transfer interrupt is generated by the corresponding peripheral.
18
AT91M55800A
1745D–ATARM–04-Nov-05
Most importantly, the PDC removes the processor interrupt handling overhead and significantly reduces the number of clock cycles required for a data transfer. It can transfer up to 64K
contiguous bytes. As a result, the performance of the microcontroller is increased and the
power consumption reduced.
8.4System Peripherals
8.4.1APMC: Advanced Power Management Controller
The AT91M55800A Advanced Power Management Controller allows optimization of power
consumption. The APMC enables/disables the clock inputs of most of the peripherals and the
ARM Core. Moreover, the main oscillator, the PLL and the analog peripherals can be put in
standby mode allowing minimum power consumption to be obtained. The APMC provides the
following operating modes:
• Normal: clock generator provides clock to the entire chip except the RTC.
• Standby mode: RTC active, all other clocks disabled
• Power down: RTC active, supply on the rest of the circuit deactivated
AT91M55800A
8.4.2RTC: Real-time Clock
The AT91M55800A features a Real-time Clock (RTC) peripheral that is designed for very low
power consumption. It combines a complete time-of-day clock with alarm and a two-hundred
year Gregorian calendar, complemented by a programmable periodic interrupt.
The time and calendar values are coded in Binary-Coded Decimal (BCD) format. The time format can be 24-hour mode or 12-hour mode with an AM/PM indicator.
Updating time and calendar fields and configuring the alarm fields is performed by a parallel
capture on the 32-bit data bus. An entry control is performed to avoid loading registers with
incompatible BCD format data or with an incompatible date according to the current month/
year/century.
8.4.3AIC: Advanced Interrupt Controller
The AIC has an 8-level priority, individually maskable, vectored interrupt controller, and drives
the NIRQ and NFIQ pins of the ARM7TDMI from:
• The external fast interrupt line (FIQ)
• The six external interrupt request lines (IRQ0 - IRQ5)
• The interrupt signals from the on-chip peripherals.
The AIC is largely programmable offering maximum flexibility, and its vectoring features
reduce the real-time overhead in handling interrupts.
The AIC also features a spurious vector, which reduces Spurious Interrupt handling to a minimum, and a protect mode that facilitates the debug capabilities.
8.4.4PIO: Parallel I/O Controller
The AT91M55800A has 58 programmable I/O lines. 13 pins are dedicated as general-purpose
I/O pins. The other I/O lines are multiplexed with an external signal of a peripheral to optimize
the use of available package pins. The PIO lines are controlled by two separate and identical
1745D–ATARM–04-Nov-05
19
PIO Controllers called PIOA and PIOB. The PIO controller enables the generation of an interrupt on input change and insertion of a simple input glitch filter on any of the PIO pins.
8.4.5WD: Watchdog
The Watchdog is built around a 16-bit counter, and is used to prevent system lock-up if the
software becomes trapped in a deadlock. It can generate an internal reset or interrupt, or
assert an active level on the dedicated pin NWDOVF. All programming registers are password-protected to prevent unintentional programming.
8.4.6SF: Special Function
The AT91M55800A provides registers which implement the following special functions.
• Chip identification
• RESET status
8.5User Peripherals
8.5.1USART: Universal Synchronous/
Asynchronous Receiver Transmitter
The AT91M55800A provides three identical, full-duplex, universal synchronous/asynchronous
receiver/transmitters.
Each USART has its own baud rate generator, and two dedicated Peripheral Data Controller
channels. The data format includes a start bit, up to 8 data bits, an optional programmable parity bit and up to 2 stop bits.
The USART also features a Receiver Timeout register, facilitating variable-length frame support when it is working with the PDC, and a Time-guard register, used when interfacing with
slow remote equipment.
8.5.2TC: Timer Counter
The AT91M55800A features two Timer Counter blocks that include three identical 16-bit timer
counter channels. Each channel can be independently programmed to perform a wide range
of functions including frequency measurement, event counting, interval measurement, pulse
generation, delay timing and pulse-width modulation.
The Timer Counters can be used in Capture or Waveform mode, and all three counter channels can be started simultaneously and chained together.
8.5.3SPI: Serial Peripheral Interface
The SPI provides communication with external devices in master or slave mode. It has four
external chip selects that can be connected to up to 15 devices. The data length is programmable, from 8- to 16-bit.
8.5.4ADC: Analog-to-digital Converter
The two identical 4-channel 10-bit analog-to-digital converters (ADC) are based on a Successive Approximation Register (SAR) approach.
Each ADC has 4 analog input pins, AD0 to AD3 and AD4 to AD7, digital trigger input pins
AD0TRIG and AD1TRIG, and provides an interrupt signal to the AIC. Both ADCs share the
analog power supply pins VDDA and GNDA, and the input reference voltage pin ADVREF.
20
AT91M55800A
1745D–ATARM–04-Nov-05
Each channel can be enabled or disabled independently, and has its own data register. The
ADC can be configured to automatically enter Sleep mode after a conversion sequence, and
can be triggered by the software, the Timer Counter, or an external signal.
8.5.5DAC: Digital-to-analog Converter
Each DAC has an analog output pin, DA0 and DA1, and provides an interrupt signal to the AIC
DA0IRQ and DA1IRQ. Both DACs share the analog power supply pins VDDA and GNDA, and
the input reference DAVREF.
AT91M55800A
1745D–ATARM–04-Nov-05
21
9.Memory Map
Figure 9-1.AT91M55800A Memory Map Before and after Remap Command
The EBI generates the signals that control the access to the external memory or peripheral
devices. The EBI is fully-programmable and can address up to 128M bytes. It has eight chip
selects and a 24-bit address bus.
The 16-bit data bus can be configured to interface with 8- or 16-bit external devices. Separate
read and write control signals allow for direct memory and peripheral interfacing.
The EBI supports different access protocols allowing single-clock cycle memory accesses.
The main features are:
• External memory mapping
• 8 active-low chip select lines
• 8- or 16-bit data bus
• Byte-write or byte-select lines
• Remap of boot memory
• Two different read protocols
• Programmable wait state generation
• External wait request
• Programmable data float time
The EBI User Interface is described on page 48.
24
AT91M55800A
1745D–ATARM–04-Nov-05
11.1External Memory Mapping
The memory map associates the internal 32-bit address space with the external 24-bit
address bus.
The memory map is defined by programming the base address and page size of the external
memories (see EBI User Interface registers EBI_CSR0 to EBI_CSR7). Note that A0 - A23 is
only significant for 8-bit memory; A1 - A23 is used for 16-bit memory.
If the physical memory device is smaller than the programmed page size, it wraps around and
appears to be repeated within the page. The EBI correctly handles any valid access to the
memory device within the page. (See Figure 11-1.)
In the event of an access request to an address outside any programmed page, an Abort signal is generated. Two types of Abort are possible: instruction prefetch abort and data abort.
The corresponding exception vector addresses are respectively 0x0000 000C and 0x0000
0010. It is up to the system programmer to program the error handling routine to use in case of
an Abort (see the ARM7TDMI datasheet for further information).
Figure 11-1. External Memory Smaller than Page Size
Memory
Map
1-Mbyte Device
1-Mbyte Device
1-Mbyte Device
1-Mbyte Device
Low
Low
Low
Low
AT91M55800A
Base + 4M Byte
Hi
Base + 3M Byte
Hi
Base + 2M Byte
Hi
Base + 1M Byte
Hi
Base
Repeat 3
Repeat 2
Repeat 1
1745D–ATARM–04-Nov-05
25
11.2EBI Pin Description
NameDescriptionType
A0 - A23Address bus (output)Output
D0 - D15Data bus (input/output)I/O
NCS0 - NCS7Active low chip selects (output)Output
NRDRead Enable (output)Output
NWR0 - NWR1Lower and upper write enable (output)Output
NOEOutput enable (output)Output
NWEWrite enable (output)Output
NUB, NLBUpper and lower byte-select (output)Output
NWAITWait request (input)Input
The following table shows how certain EBI signals are multiplexed:
Multiplexed SignalsFunctions
A0NLB8- or 16-bit data bus
NRDNOEByte-write or byte-select access
NWR0NWEByte-write or byte-select access
NWR1NUBByte-write or byte-select access
26
AT91M55800A
1745D–ATARM–04-Nov-05
11.3Data Bus Width
AT91M55800A
A data bus width of 8 or 16 bits can be selected for each chip select. This option is controlled
by the DBW field in the EBI_CSR (Chip-select Register) for the corresponding chip select.
Figure 11-2 shows how to connect a 512K x 8-bit memory on NCS2.
Figure 11-2. Memory Connection for an 8-bit Data Bus
EBI
D0 - D7
D8 - D15
A1 - A18
A0
NWR1
NWR0
NRD
NCS2
D0 - D7
A1 - A18
A0
Write Enable
Output Enable
Memory Enable
Figure 11-3 shows how to connect a 512K x 16-bit memory on NCS2.
Figure 11-3. Memory Connection for a 16-bit Data Bus
EBI
D0 - D7
D8 - D15
A1 - A19
NLB
NUBHigh Byte Enable
NWE
NOE
NCS2
D0 - D7
D8 - D15
A0 - A18
Low Byte Enable
Write Enable
Output Enable
Memory Enable
11.4Byte-write or Byte-select Access
Each chip select with a 16-bit data bus can operate with one of two different types of write
access:
• Byte-write Access supports two Byte-write and a single read signal.
• Byte-select Access selects upper and/or lower byte with two byte-select lines, and separate
read and write signals.
This option is controlled by the BAT field in the EBI_CSR (Chip-select Register) for the corresponding chip select.
Byte-write Access is used to connect 2 x 8-bit devices as a 16-bit memory page.
• The signal A0/NLB is not used.
• The signal NWR1/NUB is used as NWR1 and enables upper byte writes.
• The signal NWR0/NWE is used as NWR0 and enables lower byte writes.
• The signal NRD/NOE is used as NRD and enables half-word and byte reads.
Figure 11-4 shows how to connect two 512K x 8-bit devices in parallel on NCS2.
1745D–ATARM–04-Nov-05
27
Figure 11-4. Memory Connection for 2 x 8-bit Data Busses
EBI
D0 - D7
D8 - D15
A1 - A19
A0
NWR1
NWR0
NRD
NCS2
D0 - D7
A0 - A18
Write Enable
Read Enable
Memory Enable
D8 - D15
A0 - A18
Write Enable
Read Enable
Memory Enable
Byte-select Access is used to connect 16-bit devices in a memory page.
• The signal A0/NLB is used as NLB and enables the lower byte for both read and write
operations.
• The signal NWR1/NUB is used as NUB and enables the upper byte for both read and write
operations.
• The signal NWR0/NWE is used as NWE and enables writing for byte or half word.
• The signal NRD/NOE is used as NOE and enables reading for byte or half word.
Figure 11-5 shows how to connect a 16-bit device with byte and half-word access (e.g. 16-bit
SRAM) on NCS2.
Figure 11-5. Connection for a 16-bit Data Bus with Byte and Half-word Access
EBI
D0 - D7
D8 - D15
A1 - A19
NLB
NUBHigh Byte Enable
NWE
NOE
NCS2
D0 - D7
D8 - D15
A0 - A18
Low Byte Enable
Write Enable
Output Enable
Memory Enable
28
AT91M55800A
1745D–ATARM–04-Nov-05
AT91M55800A
Figure 11-6 shows how to connect a 16-bit device without byte access (e.g. Flash) on NCS2.
Figure 11-6. Connection for a 16-bit Data Bus Without Byte-write Capability.
11.5Boot on NCS0
EBI
D0 - D7
D8 - D15
A1 - A19
NLB
NUB
NWE
NOE
NCS2
D0 - D7
D8 - D15
A0 - A18
Write Enable
Output Enable
Memory Enable
Depending on the device and the BMS pin level during the reset, the user can select either an
8-bit or 16-bit external memory device connected on NCS0 as the Boot Memory. In this case,
EBI_CSR0 (Chip-select Register 0) is reset at the following configuration for chip select 0:
• 8 wait states (WSE = 1, NWS = 7)
• 8-bit or 16-bit data bus width, depending on BMS
Byte access type and number of data float time are respectively set to Byte-write Access and
0. With a nonvolatile memory interface, any value can be programmed for these parameters.
Before the remap command, the user can modify the chip select 0 configuration, programming
the EBI_CSR0 with exact boot memory characteristics. The base address becomes effective
after the remap command, but the new number of wait states can be changed immediately.
This is useful if a boot sequence needs to be faster.
1745D–ATARM–04-Nov-05
29
11.6Read Protocols
The EBI provides two alternative protocols for external memory read access: standard and
early read. The difference between the two protocols lies in the timing of the NRD (read cycle)
waveform.
The protocol is selected by the DRP field in EBI_MCR (Memory Control Register) and is valid
for all memory devices. Standard read protocol is the default protocol after reset.
Note:In the following waveforms and descriptions, NRD represents NRD and NOE since the two sig-
11.6.1Standard Read Protocol
Standard read protocol implements a read cycle in which NRD and NWE are similar. Both are
active during the second half of the clock cycle. The first half of the clock cycle allows time to
ensure completion of the previous access as well as the output of address and NCS before the
read cycle begins.
During a standard read protocol, external memory access, NCS is set low and ADDR is valid
at the beginning of the access while NRD goes low only in the second half of the master clock
cycle to avoid bus conflict (see Figure 11-7). NWE is the same in both protocols. NWE always
goes low in the second half of the master clock cycle (see Figure 11-8).
Figure 11-7. Standard Read Protocol
nals have the same waveform. Likewise, NWE represents NWE, NWR0 and NWR1 unless
NWR0 and NWR1 are otherwise represented. ADDR represents A0 - A23 and/or A1 - A23.
11.6.2Early Read Protocol
Early read protocol provides more time for a read access from the memory by asserting NRD
at the beginning of the clock cycle. In the case of successive read cycles in the same memory,
NRD remains active continuously. Since a read cycle normally limits the speed of operation of
the external memory system, early read protocol can allow a faster clock frequency to be
used. However, an extra wait state is required in some cases to avoid contentions on the
external bus.
MCK
ADDR
NCS
NRD
or
NWE
30
AT91M55800A
1745D–ATARM–04-Nov-05
Loading...
+ 220 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.