AVR32752: Using the AVR32 UC3 Static Memory Controller. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

Similar documents
AVR1303: Use and configuration of IR communication module. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR1315: Accessing the XMEGA EEPROM. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

a clock signal and a bi-directional data signal (SCL, SDA)

AVR1503: Xplain training - XMEGA Programmable Multi Interrupt Controller 8-bit Microcontrollers Application Note Prerequisites

AT697E. Application Note. Checking AT697E Code for Occurrence of LDF/FPOPd Instructions Sequence with a dependency on an Odd-Numbered Register

AVR32401: AVR32 AP7 Linux Interfacing DataFlash. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

8-megabyte, 4-megabyte, and 2-megabyte 2.7-volt Only DataFlash Cards AT45DCB008D AT45DCB004D AT45DCB002D. Not Recommended for New Design

AVR1922: Xplain Board Controller Firmware 8-bit Microcontrollers Application Note Features 1 Introduction

AT91 ARM Thumb Microcontrollers. Application Note. Using the ECC Controller on AT91SAM9260/9263 and AT91SAM7SE Microcontrollers. 1.

AVR32917: picopower Board getting started. 32-bit Microcontrollers. Application Note. Preliminary. Features. 1 Introduction

AVR097: Migration between ATmega128 and ATmega1281/ATmega bit Microcontrollers. Application Note. Features. 1 Introduction

AVR1501: Xplain training XMEGA Timer/Counter 8-bit Microcontrollers Application Note Prerequisites 1 Introduction

AVR based 125kHz RFID Evaluation Kit (Re)Programming Guide ATA2270-EK1. Overview. Fuse Settings: ISP Programming

One-channel Toggle-mode Touch Sensor IC with Power Management Functions AT42QT1012. Summary

8-bit Microcontroller with 2K/4K/8K Bytes In-System Programmable Flash. Appendix A. Preliminary. ATtiny261 ATtiny461 ATtiny861 Automotive

AVR32901: EVKLCD100/EVKLCD101 Hardware User's Guide. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR532: Migration from ATmega48/88/168 to ATmega48A/88A/168A. 8-bit Microcontrollers. Application Note. 1 Introduction

AVR1508: Xplain training - XMEGA DAC 8-bit Microcontrollers Application Note Features 1 Introduction

CAN, 80C51, AVR, Microcontroller. Application Note

CAN Microcontrollers. Application Note. Migrating from T89C51CC01 to AT89C51CC03. Feature Comparison

8-bit Microcontroller with 16K Bytes In-System Programmable Flash. ATtiny87 ATtiny167 Automotive

AT91 ARM Thumb-based Microcontroller. Application Note. AT91SAM7X and AT91SAM7XC Microcontroller Series Schematic Check List. 1.

AT17F Series. Application Note. Programming Circuits for AT17F Series Configurators with Xilinx FPGAs. 1. Introduction

AT91 ARM Thumb Microcontrollers. Application Note. AT91 Host Flash Loader. 1. Package Contents. 2. Definition of Terms. 3.

AVR32 UC3 Software Framework... User Manual

Rad Hard FPGA. AT40KEL-DK Design Kit Content. Description. Kit Content. Reference Material. Support

AVR1518: XMEGA-A1 Xplained Training - XMEGA Clock System. 8-bit Atmel Microcontrollers. Application Note. Prerequisites.

Atmel QT600 Quick Start Guide Touch Solutions

Application Note. Microcontrollers. Using Keil FlashMon Emulator with AT89C51CC01/03 AT89C51CC01/ Summary. 2. Background overview

AT89ISP Programmer Cable Introduction AT89ISP Programmer Cable Parallel Port Settings Application Note AT89ISP Software AT89ISP Cable polarized

AVR32015: AVR32 Studio getting started. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

ATA2270-EK1. User Guide

ATDH2200E Programming Kit... User Guide

Interfacing the internal serial EEPROM

8-bit Microcontroller. Application Note. AVR320: Software SPI Master

AT89C51CC03 UART Bootloader

Atmel AVR1619: XMEGA-B1 Xplained Demonstration. 8-bit Atmel Microcontrollers. Application Note. Features. 1 Introduction

Atmel LF-RFID Kit Comparison Chart. Application Note. Atmel LF-RFID Kit Comparison Chart. 1. Description

AVR42789: Writing to Flash on the New tinyavr Platform Using Assembly

512K (64K x 8) 3-volt Only Flash Memory AT29LV512

APPLICATION NOTE. Atmel AVR1638: XMEGA RTC Calibration. 8-bit Atmel Microcontrollers. Features. Introduction

APPLICATION NOTE. AT03324: Atmel REB212BSMA-EK Quick Start Guide. Atmel MCU Wireless. Introduction

Embedded AVR Microcontroller Including RF Transmitter and Immobilizer LF Functionality for Remote Keyless Entry ATA5795. Summary.

Trusted Platform Module AT97SC3203S. SMBus Two-Wire Interface. Summary

APPLICATION NOTE. Atmel AT03160: Migrating Bootloader from ATxmega128A1 to other Atmel XMEGA Devices. Atmel AVR XMEGA. Features.

AVR4018: Inertial Two (ATAVRSBIN2) Hardware User's Guide. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR ONE!... Quick-start Guide. EVK Windows 32103C AVR ONE! 02/10

Atmel AVR32847: Migration from/to the UC3L0 64/32/16 from/to the UC3L0 256/ bit Atmel Microcontrollers. Application Note.

64K (8K x 8) High Speed Parallel EEPROM with Page Write and Software Data Protection AT28HC64BF

TSC695. Application Note. Annulled Cycle Management on the TSC695. References

AVR515: Migrating from ATmega48/88/168 and ATmega48P/88P/168P/328P to ATtiny48/88. 8-bit Microcontrollers. Application Note. Features.

AVR469: MC301 Hardware User Guide. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

2-megabit (256K x 8) 5-volt Only Flash Memory AT29C020

Atmel CryptoAuthentication Starter Kit

4-megabit (512K x 8) 5-volt Only 256-byte Sector Flash Memory AT29C040A

1-megabit (128K x 8) 3-volt Only Flash Memory AT29LV010A

2-megabit (256K x 8) Single 2.7-volt Battery-Voltage Flash Memory AT29BV020

8-bit RISC Microcontroller. Application Note. AVR151: Setup And Use of The SPI

Rad Hard 16 MegaBit 3.3V SRAM Multi- Chip Module AT68166H

AVR501: Replacing ATtiny15 with ATtiny25. 8-bit Microcontrollers. Application Note PRELIMINARY. Features. 1 Introduction

APPLICATION NOTE. Atmel AT01080: XMEGA E Schematic Checklist. Atmel AVR XMEGA E. Features. Introduction

Hardware Prerequisites Atmel Xplained Pro Evaluation Kit Atmel WINC1500 extension USB Micro Cable (TypeA / MicroB)

Section 1 ATAVRAUTOEK1 Getting Started

1-megabit (128K x 8) Paged Parallel EEPROM AT28C010

AT17 Series FPGA. Configuration Memory. Application Note. In-System Programming Circuits for AT17 Series Configurators with Atmel and Xilinx FPGAs

APPLICATION NOTE. Atmel AT02260: Driving AT42QT1085. Atmel QTouch. Features. Description

AT60142H/HT. Rad-Hard 512Kx8 Very Low Power CMOS SRAM ERRATA-SHEET. Active Errata List. Errata History. Abbreviations. 1.

AVR2015: RZRAVEN Quick Start Guide. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

8051 Microcontrollers. Application Note. Migration from AT89C5131 & AT89C5131A-L to AT89C5131A-M

APPLICATION NOTE. Atmel AT03304: SAM D20 I 2 C Slave Bootloader SAM D20. Description. Features

STK521. User Guide B AVR 01/12

Atmel AVR1926: XMEGA-B1 Xplained Getting Started Guide. 8-bit Atmel Microcontrollers. Application Note. Features. 1 Introduction

AT89STK-10 Starter Kit... Hardware User Guide

APPLICATION NOTE. Atmel AVR057: Internal RC Oscillator Calibration for ATtiny4/5/9/10/20/40. 8-bit Atmel Microcontrollers. Features.

AVR32817: Getting Started with the 32-bit AVR UC3 Software Framework lwip TCP/IP Stack. 32-bit Microcontrollers. Application Note.

MARC4. Application Note. Hints and Tips for Hard- and Software Developments with MARC4 Microcontrollers

SAM Boot Assistant (SAM-BA)... User Guide

AT91 ARM Thumb Microcontrollers. Application Note. Migrating to an AT91SAM9G20-based System from an AT91SAM9260-based System. 1. Scope. 2.

APPLICATION NOTE. Atmel AVR3009: Driving QTouch Device with I 2 C Interface. Atmel QTouch. Introduction

64K (8K x 8) Battery-Voltage Parallel EEPROM with Page Write and Software Data Protection AT28BV64B

APPLICATION NOTE. Atmel AVR116: Wear Leveling on DataFlash. 32-bit Atmel Microcontrollers. Features. Description. Wear leveling

APPLICATION NOTE. Atmel AVR536: Migration from ATmega644 to ATmega644A. 8-bit Atmel Microcontrollers. Introduction

Atmel AVR473: ATAVRSB202 Hardware User Guide. 8-bit Atmel Microcontrollers. Application Note. Features. 1 Introduction

AT89C5131 Starter Kit... Software User Guide

Native route discovery algorithm

8-bit RISC Microcontroller. Application Note. AVR 305: Half Duplex Compact Software UART

OLED display with pixels resolution Ambient light sensor CPU load Analog filter Quadrature Encoder with push button Digital I/O

Section 5 SERCOM. Tasks SPI. In this section you will learn:

AT17(A) Series FPGA Configuration Memory. Application Note

T89C51CC02 CAN Bootloader

Secure Microcontrollers for Smart Cards. AT90SC Summary

AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Features. Introduction. AVR 8-bit Microcontrollers APPLICATION NOTE

32Kbytes on-chip SRAM. Viterbi decoding and CRC PRIME compliant 128-bit AES encryption Channel sensing and collision pre-detection

Power Management and Analog Companions (PMAAC) Application Note. AT73C240 Power-On and Power-Off Sequences. 1. Scope. 2. Operating Conditions

Atmel AT697F. Rad-Hard 32-bit SPARC v8 Processor ERRATA SHEET. Active Errata List

Atmel AVR ATxmega384C3 microcontroller OLED display with 128x32 pixels resolution Analog sensors. Ambient light sensor Temperature sensor

When is Data Susceptible to Corruption

AT94K Series Field Programmable System Level Integrated Circuit. Application Note. FPSLIC Baud Rate Generator

APPLICATION NOTE. Atmel AT03782: Using Low Power Modes in SAM4N Microcontroller. Atmel 32-bit Microcontroller. Features.

FPGA Configuration EEPROM Memory. Application Note. Programming Atmel s EEPROMs: AT17LV020(A) vs. AT17LV002(A) Introduction.

Transcription:

AVR32752: Using the AVR32 UC3 Static Memory Controller Features Several Types of Access Supported - 8-bit Access Mode - 16-bit Access Mode Software Configurable - Timing Parameters - Initializations 32-bit Microcontrollers Application Note 1 Introduction The AVR32 UC3 microcontroller has a dedicated Static Memory Controller (). This controller is highly flexible and capable of supporting a series of external static memory devices. Timing values and parameters are calculated from the external static memory device s datasheet and programmed into the controller. This is also true for various types of access with respect to read and write operations. When the controller is correctly instantiated, the external device can then be accessed as a normal memory mapped device. The controller provides a seamless and transparent interface to a memory mapped device. The purpose of this application note is to understand all features available in the and to deliver guidelines to interface AVR32 UC3 microcontroller and external static memory devices. Rev.

2 Abbreviations EBI: External Bus Interface GPIO: General Purpose Input Output HMATRIX: HSB Bus Matrix HSB: High Speed Bus PBA: Peripheral Bus A PBB: Peripheral Bus B : Static Memory Controller 2 AVR32752

AVR32752 3 Features Several features are available in the : - Chip select. - Programmable pulse, setup and hold times for read and write accesses per chip select. - 8- and16-bit Data Bus. The is capable of 8-bit or 16-bit data path, and supports byte, half-word and word access. Bursts are supported for both write and read access. 3.1 Device characteristics The is able to drive four different static memory devices. Each static memory device has specific timings and command sequence. These characteristics are stored into the to control the data flow between the AVR32 and the static memory device. Once the is configured, the access to the static memory device is seamless to the user. Each chip select is assigned to a memory area (check the Physical Memory Map section of the datasheet). 3.2 Access The Controller is part of the EBI (External Bus Interface), which is accessed through the System Bus from the CPU core. The Controller may connect to an external static memory device through the GPIO. A conceptual schematic of the path is illustrated in Figure 3-1. 3.3 Physical Layout and Access Figure 3-1. Interface with a 16-bit Static Memory Device AVR32 SRAM CPU EBI NCS[3:0] CSx NRD RD HSB NWE WE PBB User interface GPIO D[15:0] D[15:0] 0 1 2 3 Multiple static memory devices can be connected together to the to increase the amount of static memory devices available to the system. 3

4 Controller 4.1 Source files 4.2 Initialization The must be configured before starting to communicate with static memory device. The configuration of the is accessible through the software driver contained in the AVR32752.zip file delivered with the application note and available on www.atmel.com.the source file location of Table 4-1 is related to the following location src/drivers/ebi//. Table 4-1. Driver file names Source file smc.c/smc.h conf_ebi.h smc_peripheral.h Description Driver: - Setup of Alternate Functions Used - Setup of Mode Used - Setup of Timing Used Define the pin mapping for the application. Here, all alternate pins used should be defined Customize this file for the application. Enable the chipselect required using the definition: #define USE_NCSx //x : the number of the chipselect #define COMPONENT_CSx "smc_peripheral.h" Duplicate these two definitions if the application requires more than 1 device. Template to address device component. Duplicate and rename if the application requires more than 1 device. It contains : - Memory Size Definition. - Data Bus Width Definition. - Address Length Definition. - Mode Definition. After a reset, the AVR32 is not configured to access an external static memory device. The sequence for initializing the after a successful reset should be as follows: Initialize the and timing characteristics for the device (see smc.c file). // Setup for NCS0 _CS_SETUP(0) Configure the GPIO controller (see smc.c file). // Setup Alternate function for gpio_enable_module(_ebi_gpio_map, sizeof(_ebi_gpio_map) / sizeof(_ebi_gpio_map[0])); 4 AVR32752

4.3 Data Bus Width Definition AVR32752 A data bus width of 8 or 16 bits can be selected for each chip select. This option is controlled by the field DBW in MODE (Mode Register) for the corresponding chip select (see smc_peripheral.h file): //! Data Bus Width #define _DBW 16 4.4 Mode Definition Each chip select with a 16-bit data bus can operate with one of two different types of write access: byte write or byte select access. This is controlled by the BAT (BAT = Byte Access Type) field of the MODE register for the corresponding chip select. Byte write access supports one byte write signal per byte of the data bus and a single read signal. (see smc_peripheral.h file): //! Whether 8-bit SM chips are connected on the #define _8_BIT_CHIPS TRUE //Byte Write Access #define _8_BIT_CHIPS FALSE //Byte Select Access In byte select access mode, read/write operations can be enabled/ disabled at a byte level. One byte-select line per byte of the data bus is provided. One NRD and one NWE signal control read and write operations. 5

5 Analysis for Read-Write Access In order to better understand all the signals exchanged between the and static memory device, here are some examples of usage of the software driver with different test cases of hardware interfaces. 5.1 Source code used for analysis Each analysis differs from the others by changes in the smc_peripheral.h file and by the data bus width field (DBW). 5.2 16-bit Mode (DBW= 1 ) In this first test case, the is setup with a data-bus width of 16 bits. We will analyze this first connection with different variable width access (16-bit and 8-bit data access). 5.2.1 Writing 16-bit data into a 16-bit static memory device The data bus width is configured to the maximum size available (16) and the byte access mode should be configured to mode 0 (BAT= 0 ). In that case, the provides two byte select lines NBS0 and NBS1. NBS0 is used to access the lower byte of the static memory device byte and NBS1 is used to access the higher byte of the static memory device. Figure 5-1. Interface with a 16-bit Static Memory Device AVR32 Static Memory Device NCS[3:0] CS NRD RD HSB GPIO NBS1 High Byte Enable NBS0 Low Byte Enable NWE WE User interface D[15:0] D[15:0] PBB Refer to smc_peripheral.h //! Data Bus Width #define _DBW 16 //! Whether 8-bit SM chips are connected on the #define _8_BIT_CHIPS FALSE 6 AVR32752

AVR32752 To perform a write instruction: //! Write Macro Function in 16-bit mode. #define smc_write_16(b,o,d) (((volatile U16 *)(b))[(o)] = (U16)(d)) smc_write_16(sram,i,i); NBS0 will toggle once, for data access as Figure 5-2 shows. Figure 5-2. DBW= 1, BAT= 0 and 16-bits write access. Channel 1 NBS0- Channel 3 NWE0 Channel 2 - NBS1-7

5.2.2 Writing 16-bit data into two 8-bit data static memory devices The data bus width is configured to the maximum size available (16) and in case of 2x8-bit devices access, the byte access should be configured to mode 1 (BAT= 1 ). In that case, the provides two write enable lines NWR0 and NWR1. NWR0 and NWR1 are used for respectively access to the static memory device 0 (lower byte D7-D0) and static memory device 1 (higher byte D15-D8). Figure 5-3. Interface with 2x 8-bit Static Memory Devices Static Memory Device 1 CSx RD WE AVR32 D[15:8] Static Memory Device 0 NCS[3:0] CSy HSB GPIO NRD NWR1 RD NWR0 WE User interface D[15:0] D[7:0] PBB 8 AVR32752

AVR32752 Refer to smc_peripheral.h //! Data Bus Width #define _DBW 16 //! Whether 8-bit SM chips are connected on the #define _8_BIT_CHIPS TRUE To perform the write instruction: //! Write Macro Function in 16-bit mode. #define smc_write_16(b,o,d) (((volatile U16 *)(b))[(o)] = (U16)(d)) smc_write_16(sram,i,i); NWR0 will toggle for event address access and NWR1 will toggle for odd address access, as Figure 5-4 shows. Figure 5-4. DBW= 1, BAT= 1 and 8-bits write access. Channel 1 A0 line Channel 3 NWR0 Channel 2 NWR1 9

5.3 8-bit Mode (DBW= 0 ) The Controller is setup with a data-bus width of 8 bits. The data bus width is configured to the minimum size available, 8, and there is no dependency to the byte access mode (BAT= 0 / 1 ). In that case, the provides one write enable line for write access to the device. Figure 5-5. Interface with an 8-bit Static Memory Device AVR32 Static Memory Device HSB NCS[3:0] CS GPIO NRD RD NWR0 WE0 User interface D[7:0] D[7:0] PBB Refer to smc_peripheral.h //! Data Bus Width #define _DBW 8 //! Whether 8-bit SM chips are connected on the #define _8_BIT_CHIPS TRUE/FALSE (Ignored) 10 AVR32752

AVR32752 To perform the write instruction: //! Write Macro Function in 8-bit mode. #define smc_write_8(b,o,d) (((volatile U8 *)(b))[(o)] = (U8)(d)) smc_write_8(sram,i,i); NWR0 will toggle twice, for high to low data access as Figure 5-6 shows. Figure 5-6. DBW= 0 and 8-bits write access. Channel 1 A0 line Channel 3 NWR0 Channel 2 NWR1 11

Disclaimer Headquarters International 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 Atmel Europe Le Krebs 8, Rue Jean-Pierre Timbaud BP 309 78054 Saint-Quentin-en- Yvelines Cedex France Tel: (33) 1-30-60-70-00 Fax: (33) 1-30-60-71-11 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 Product Contact Web Site www.atmel.com Technical Support avr32@atmel.com Sales Contact www.atmel.com/contacts Literature Request www.atmel.com/literature 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 in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMEL S TERMS AND CONDITIONS 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 INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, OR LOSS 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 herein. 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 support or sustain life. 2008 Atmel Corporation. All rights reserved. Atmel, logo and combinations thereof, AVR and others, are the registered trademarks or trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others.