Professional Documents
Culture Documents
Description
The External Bus Interface (EBI) is designed to ensure the successful data transfer between several external devices and the embedded memory controller of an ARMbased device. The Static Memory, SDRAM and Burst Flash Controllers are all featured external memory controllers on the EBI. These external memory controllers are capable of handling several types of external memory and peripheral devices, such as SRAM, PROM, EPROM, EEPROM, Flash, SDRAM and Burst Flash. The EBI also supports the CompactFlash and the SmartMedia protocols via integrated circuitry that greatly reduces the requirements for external components. Furthermore, the EBI handles data transfers with up to eight external devices, each assigned to eight address spaces defined by the embedded Memory Controller. Data transfers are performed through a 16-bit or 32-bit data bus, an address bus of up to 26 bits, up to eight chip select lines (NCS0 - NCS7) and several control pins that are generally multiplexed between the different external memory controllers. The HOLD and HOLDA interface pins are reserved for sharing the external bus with an external master.
Rev. 1759BCASIC05/02
Functional Description
The EBI transfers data between the internal ASB Bus (handled by the Double Master Memory Controller or the Multi-master Memory Controller) and external memories and peripheral devices. It controls the waveforms and the parameters of the external address, data and control busses and is composed of the following elements: The Static Memory Controller (SMC) The SDRAM Controller (SDRAMC) The Burst Flash Controller (BFC) A chip select assignor that assigns an ASB address space to the external devices A multiplex controller circuit that shares the pins between the different memory controllers A bus sharing logic module to handle external master bus requests Programmable CompactFlash support logic Programmable SmartMedia support logic
Figure 1 shows the organization of the External Bus Interface. Figure 1. Organization of the External Bus Interface
ASB
MUX Logic SmartMedia Logic CompactFlash Logic Data Address Control PIO
User Interface
HOLDA HOLD
APB
3
1759BCASIC05/02
Pin Controller D0 - D7 D8 - D15 D16 - D31 A0/NBS0 A1/NWR2/NBS2 A2 - A9 A10 A11 SDA10 A12 A13 - A15 A16/BA0 A17/BA1 A18 - A20 A21 A22 A23 - A24 A25 NCS0/BFCS NCS1/SDCS NCS2
SDRAM SDRAMC D0 - D7 D8 - D15 D16 - D31 DQM0 DQM2 A0 - A7 A8 A9 A10 A11 - A13 BA0 BA1 CS
Pin NCS3/SMCS NCS4/CFCS NCS5/CFCE1 NCS6/CFCE2 NRD/NOE/CFOE NWR0/NWE/CFWE NWR1/NBS1/CFIOR NWR3/NBS3/CFIOW BFCK BFAVD BFBAA/SMWE BFOE BFRDY/SMOE BFWE SDCK SDCKE RAS CAS SDWE NWAIT Pxx
(2)
WE OE CE RDY
Pxx(2) Pxx
(2)
Notes:
1. Not directly connected to the CompactFlash slot. Permits the control of the bi-directional buffer between the EBI data bus and the CompactFlash slot. 2. Any PIO line. 3. The REG signal of the CompactFlash can be driven by any of the following address bits: A24, A22 to A11. For details, see CompactFlash Support on page 9. 4. The CLE and ALE signals of the SmartMedia device may be driven by any address bits. For details, see SmartMedia Support on page 12. 5. NWR1 enables upper byte writes. NWR0 enables lower byte writes.
5
1759BCASIC05/02
Application Example
Figure 2. EBI Connections to SDRAM and Burst Flash
EBI
D0-D31 RAS CAS SDCK SDCKE SDWE A0/NBS0 NWR1/NBS1 A1/NWR2/NBS2 NWR3/NBS3 NRD/NOE NWR0/NWE
D0-D7
2M x 8 SDRAM
D0-D7
D8-D15
2M x 8 SDRAM
D0-D7
2M x 8 SDRAM
D0-D7
D24-D31
2M x 8 SDRAM
D0-D7
2M x 16 Burst Flash
D0-D15 CE A0-A20 A1-A21
128K x 8 SRAM
D0-D7 D0-D7 A0-A16 A1-A17 D8-D15
128K x 8 SRAM
D0-D7 A0-A16 A1-A17
CS OE WE
Static Memory Controller The Static Memory Controller (SMC) controls a 16-bit data bus, a 26-bit address bus
and the signals that control accesses to external static devices, including up to eight chip select lines. The Chip Select Register of each of the eight chip select areas configures the behavior of the SMC. It supports byte, half-word and word-aligned accesses. For all chip selects, the user can program: Data bus width to 8 bits or 16 bits Up to 128 wait states Up to 15 data float times (wait time after a read access is finished to prevent any bus contention in case the external device is too slow in releasing the bus or latches the data too long after the chip select rising edge) In the case of a 16-bit wide data bus, the user can program the SMC to control one 16-bit device (Byte Access Select Type) or two 8-bit devices in parallel that emulate a 16-bit memory (Byte Write Access Type). The read and write signal address setup and hold times at up to seven cycles An optional address setup and hold time on the Chip Select The early read protocol, which allows assertion of the read signal at the beginning of the access and thus facilitates running at 0 wait state with external devices
For further information on the Static Memory Controller 2, see the Static Memory Controller 2 datasheet, literature number 1783.
The Burst Flash Controller (BFC) provides an interface for external 16-bit Burst Flash devices and handles an address space of 256M bytes. It supports byte-, half-word and word-aligned accesses. The BFC also supports data bus and address bus multiplexing. Furthermore, the Burst Flash Interface supports asynchronous and burst operating modes. Two protocols are available in Burst Mode, the clock-controlled address advance protocol and the signal-controlled address advance protocol. The clock-controlled address advance protocol automatically increments the address at each clock cycle. However, in signal-controlled address advance protocol the address is incremented only when the BFBAA signal is active. The BFC clock speed is programmable to be either Master Clock or Master Clock divided by 2 or 4. Page size handling (16 bytes to 1024 bytes) is supported for Burst Flash devices unable to handle continuous burst read. The Burst Flash Controller can also be programmed to suspend and maintain the current burst. In this mode, the BFC can restart a sequential access without any additional latency. For further information on the Burst Flash Controller, refer to the Burst Flash Controller datasheet, literature number 1757. 7
1759BCASIC05/02
SDRAM Controller
The SDRAM controller supports the interface to external 16- or 32-bit SDRAM devices. It can address up to 256M bytes. The supported page size ranges from 2048 to 8192 and the number of columns from 256 to 2048. It supports byte, half-word and word accesses. The SDRAM controller supports a read or write burst. It also keeps track of the active row in each bank, thus maximizing SDRAM performance (i.e., the application software may be placed in one bank and data in the other banks). Additional features include multibank ping-pong access, support of self-refresh and lowpower modes, automatic refresh operations with programmable refresh rates and automatic page break when a memory boundary has been reached. For further information on the SDRAM Controller, see the SDRAM Controller datasheet, literature number 1758.
Bus Sharing
The EBI features bus sharing which enables the external bus to be shared with any external master device. The HOLD and HOLDA pins permit, respectively, the external master to request the bus and the External Bus Interface to acknowledge this request. After the HOLD assertion by the external master, the EBI hands over the bus after completion of the transfer in progress. It activates the HOLDA signal. The external master deactivates the HOLD signal when it has finished its transfers. Only EBI accesses are blocked during the period of time lost for bus arbitration. Any onchip accesses not requiring the EBI can be performed during this time. The Bus Sharing is disabled after reset and the level on the HOLD pin cannot affect the External Bus Interface behavior until the EBSEN (External Bus Sharing Enable) bit in EBI_CFGR is set. When the bus is granted to the external master, all data and address lines are tri-stated and all the chip select lines remain inactive, except the NCS2, which is tri-stated. The HOLD and HOLDA pins are multiplexed with PIO lines and are generally programmed after reset as general-purpose I/O lines. The user must appropriately program the PIO Controller before enabling the Bus Sharing feature.
Pull-up Control
The EBI permits enabling of on-chip pull-up resistors on the data bus lines not multiplexed with the PIO Controller lines. The pull-up resistors are enabled after reset. Setting the DBPUC bit disables the pull-up resistors on the D0 to D15 lines. Enabling the pull-up resistor on the D16 - D31 lines can be performed by programming the appropriate PIO controller.
Note:
In the example above, the A22 pin of the EBI can be used to drive the REG signal of the CompactFlash Device.
Read/Write Signals
In I/O Mode, the CompactFlash logic drives the Read and Write command signals of the SMC on CFIOR and CFIOW signals, while the CFOE and CFWE signals are deactivated. Likewise, in Common Memory Mode and Attribute Memory Mode, the SMC signals are driven on the CFOE and CFWE signals, while the CFIOR and CFIOW are deactivated. Figure 4 demonstrates a schematic representation of this logic. Attribute Memory Mode, Common Memory Mode and I/O Mode are supported by setting the address setup and hold time on the NCS4 chip select to the appropriate values. For details on these signal waveforms, please refer to the Static Memory Controller 2 datasheet, literature number 1783.
9
1759BCASIC05/02
Access Type
The CFCE1 and CFCE2 signals enable upper- and lower-byte access on the data bus of the CompactFlash device in accordance with Table 3. The odd byte access on the D[7:0] bus is only possible when the SMC is configured to drive 8-bit memory devices on the NCS4 pin. The Chip Select Register (DBW field) of the NCS4 address space must be set as shown in Table 3 to enable the required access type. The CFCE1 and CFCE2 waveforms are identical to the NCS4 waveform. For details on these waveforms and timings, refer to the Static Memory Controller 2 datasheet, literature number 1783.
Table 4 and Table 5 illustrate the multiplexing of the CompactFlash logic signals with other EBI signals on the EBI pins. The EBI pins in Table 4 are strictly dedicated to the CompactFlash interface as soon as the CS4A field of the Chip Select Assignment Register is set. These pins must not be used to drive any other memory devices. The EBI pins in Table 5 remain shared between all memory areas when the CompactFlash interface is enabled (CS4A = 1).
10
Application Example
Figure 5 illustrates an example of a CompactFlash application. CFCS and CFRNW signals are not directly connected to the CompactFlash slot, but do control the direction and the output enable of the buffers between the EBI and the CompactFlash Device. The timing of the CFCS signal is identical to the NCS4 signal. Moreover, the CFRNW signal remains valid throughout the transfer, as does the address bus. The CompactFlash _WAIT signal is connected to the NWAIT input of the static memory controller. For details on these waveforms and timings, refer to the Static Memory Controller 2 datasheet, literature number 1783. Figure 5. CompactFlash Application Example
EBI CF Connector
D[15:0]
DIR /OE
D[15:0]
A25/CFRNW NCS4/CFCS
/OE
A[10:0] A22/REG
A[10:0] _REG
NCS5/CFE1 NCS6/CFE2
_CE1 _CE2
CFNWAIT
_WAIT
11
1759BCASIC05/02
SmartMedia Support
The EBI integrates circuitry that interfaces to SmartMedia or NAND Flash devices. The SmartMedia logic is driven by the Static Memory Controller on the NCS3 address space. Programming the CS3A field in the Chip Select Assignment Register to the appropriate value enables the SmartMedia logic. Access to an external SmartMedia device is then made by accessing the address space reserved to NCS3 (i.e., between 0x4000 0000 and 0x4FFF FFFF). The SmartMedia Logic drives the Read and Write command signals of the SMC on the SMOE and SMWE signals when the NCS3 signal is active. SMOE and SMWE are invalidated as soon as the transfer address fails to lie in the NCS3 address space. For details on these waveforms, refer to the Static Memory Controller 2 datasheet, literature number 1783. The SMWE and SMOE signals are multiplexed with BFRDY and BFBAA signals of the Burst Flash Controller. This multiplexing is controlled in the MUX logic part of the EBI by the CS3A field of the Chip Select Assignment Register. This logic also controls the direction of the BFRDY/SMOE pad.
BFC
MUX Logic
BFRDY
BFRDY_SMOE
BFBAA
BFBAA_SMWE
SMC
NCS3 NRD_NOE
SmartMedia Logic
SMOE
SMWE NWR0_NWE
12
D[7:0] A[22:21]
NCS3/SMCS
Not connected
EBI SmartMedia
BFBAA/SMWE BFRDY/SMOE
NWE NOE
PIO PIO
CE R/B
13
1759BCASIC05/02
14
23
22
21
20
19
18
17
16
15
14
13
12
11
10
4 CS4A
3 CS3A
1 CS1A
0 CS0A
CS0A: Chip Select 0 Assignment 0 = Chip Select 0 is assigned to the Static Memory Controller. 1 = Chip Select 0 is assigned to the Burst Flash Controller. CS1A: Chip Select 1 Assignment 0 = Chip Select 1 is assigned to the Static Memory Controller. 1 = Chip Select 1 is assigned to the SDRAM Controller. CS3A: Chip Select 3 Assignment 0 = Chip Select 3 is only assigned to the Static Memory Controller and NCS3 behaves as defined by the SMC. 1 = Chip Select 3 is assigned to the Static Memory Controller and the SmartMedia Logic is activated. CS4A: Chip Select 4 Assignment 0 = Chip Select 4 is assigned to the Static Memory Controller and NCS4, NCS5 and NCS6 behave as defined by the SMC. 1 = Chip Select 4 is assigned to the Static Memory Controller and the CompactFlash Logic is activated. Accessing the address space reserved to NCS5 and NCS6 may lead to an unpredictable outcome.
15
1759BCASIC05/02
23
22
21
20
19
18
17
16
15
14
13
12
11
10
1 EBSEN
0 DBPUC
DBPUC: Data Bus Pull-Up Configuration 0 = D0 - D15 Data Bus bits are internally pulled-up to the VDDIOM power supply. 1 = D0 - D15 Data Bus bits are not internally pulled-up. EBSEN: Bus Sharing Enable 0 = The External Bus Sharing feature is disabled. 1 = The External Bus Sharing feature is enabled.
16
Atmel Headquarters
Corporate Headquarters
2325 Orchard Parkway San Jose, CA 95131 TEL 1(408) 441-0311 FAX 1(408) 487-2600
Atmel Operations
Memory
2325 Orchard Parkway San Jose, CA 95131 TEL 1(408) 441-0311 FAX 1(408) 436-4314
RF/Automotive
Theresienstrasse 2 Postfach 3535 74025 Heilbronn, Germany TEL (49) 71-31-67-0 FAX (49) 71-31-67-2340 1150 East Cheyenne Mtn. Blvd. Colorado Springs, CO 80906 TEL 1(719) 576-3300 FAX 1(719) 540-1759
Europe
Atmel Sarl Route des Arsenaux 41 Case Postale 80 CH-1705 Fribourg Switzerland TEL (41) 26-426-5555 FAX (41) 26-426-5500
Microcontrollers
2325 Orchard Parkway San Jose, CA 95131 TEL 1(408) 441-0311 FAX 1(408) 436-4314 La Chantrerie BP 70602 44306 Nantes Cedex 3, France TEL (33) 2-40-18-18-18 FAX (33) 2-40-18-19-60
Asia
Room 1219 Chinachem Golden Plaza 77 Mody Road Tsimhatsui East Kowloon Hong Kong TEL (852) 2721-9778 FAX (852) 2722-1369
ASIC/ASSP/Smart Cards
Zone Industrielle 13106 Rousset Cedex, France TEL (33) 4-42-53-60-00 FAX (33) 4-42-53-60-01 1150 East Cheyenne Mtn. Blvd. Colorado Springs, CO 80906 TEL 1(719) 576-3300 FAX 1(719) 540-1759 Scottish Enterprise Technology Park Maxwell Building East Kilbride G75 0QR, Scotland TEL (44) 1355-803-000 FAX (44) 1355-242-743
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
e-mail
literature@atmel.com
Web Site
http://www.atmel.com
Atmel Corporation 2002. Atmel Corporation makes no warranty for the use of its products, other than those expressly contained in the Companys standard warranty which is detailed in Atmels Terms and Conditions located on the Companys web site. The Company assumes no responsibility for any errors which may appear in this document, reserves the right to change devices or specifications detailed herein at any time without notice, and does not make any commitment to update the information contained herein. No licenses to patents or other intellectual property of Atmel are granted by the Company in connection with the sale of Atmel products, expressly or by implication. Atmels products are not authorized for use as critical components in life support devices or systems.
ATMEL is the registered trademark of Atmel. ARM and ARMPowered are the registered trademarks of ARM, Ltd.; SmartMedia is a trademark of Toshiba Corporation; CompactFlash is a trademark of SanDisk Corporation. Other terms and product names may be the trademarks of others.