Application Note Software Device Drivers for the M29Fxx Flash Memory Device

Similar documents
Application Note C Library Source Code for M29W256 Flash Memory Using the Flash Device Driver Software Interface

Technical Note. Software Driver for M29EW NOR Flash Memory. Introduction. TN-13-12: Software Driver for M29EW NOR Flash Memory.

Technical Note. J3F 32Mb, 64Mb, 256Mb Parallel NOR Flash Memory Software Device Drivers. Introduction. TN-12-50: J3F Software Device Drivers

AN Migration Guide

AN Migration Guide

AN2663 Application note

AN3102 Application note

AN2685 Application note

Migration Guide: Numonyx StrataFlash Embedded Memory (P30) to Numonyx StrataFlash Embedded Memory (P33)

Forging a Future in Memory: New Technologies, New Markets, New Applications. Ed Doller Chief Technology Officer

3 Volt Intel StrataFlash Memory to i960 H CPU Design Guide

Spansion* Flash Memory to Numonyx StrataFlash Wireless Memory (L) Migration Guide Application Note #309205

How to migrate to Numonyx Axcell M29EW (SBC) from Spansion S29GL flash (32-, 64- and 128-Mbit) Application Note May 2010

This user manual describes the VHDL behavioral model for NANDxxxxxBxx flash memory devices. Organization of the VHDL model delivery package

User Guide. Micron NAND Flash Simulator (NSIM)

Conversion Guide (256-Mbit): Numonyx Embedded Flash Memory (J3 v. D, 130 nm) to Numonyx StrataFlash Embedded Memory (J3-65 nm)

Intel X48 Express Chipset Memory Controller Hub (MCH)

3 Volt Intel StrataFlash Memory to Motorola MC68060 CPU Design Guide

Common Flash Interface (CFI) and Command Sets

Boot Agent Application Notes for BIOS Engineers

Migration Guide for Numonyx StrataFlash Wireless Memory (L18/L30) to Numonyx StrataFlash Embedded Memory (P30)

Intel IXP400 Digital Signal Processing (DSP) Software: Priority Setting for 10 ms Real Time Task

Software Evaluation Guide for ImTOO* YouTube* to ipod* Converter Downloading YouTube videos to your ipod

Intel G31/P31 Express Chipset

Micron Parallel NOR Flash Embedded Memory

Non-Volatile Memory Cache Enhancements: Turbo-Charging Client Platform Performance

INTEL PERCEPTUAL COMPUTING SDK. How To Use the Privacy Notification Tool

NAND32GW3F4A. 32-Gbit (4 x 8 Gbits), two Chip Enable, 4224-byte page, 3 V supply, multiplane architecture, SLC NAND flash memories.

Intel Desktop Board DH55TC

AN2061 APPLICATION NOTE

Intel Cache Acceleration Software for Windows* Workstation

Intel 945(GM/GME)/915(GM/GME)/ 855(GM/GME)/852(GM/GME) Chipsets VGA Port Always Enabled Hardware Workaround

M29W320DT M29W320DB. 32 Mbit (4Mbx8 or 2Mbx16, Non-uniform Parameter Blocks, Boot Block), 3V Supply Flash memory. Feature summary

Intel Desktop Board DZ68DB

Intel IXP42X Product Line of Network Processors and IXC1100 Control Plane Processor: Boot-Up Options

LED Manager for Intel NUC

SELINUX SUPPORT IN HFI1 AND PSM2

Intel 82580EB/82580DB GbE Controller Feature Software Support. LAN Access Division (LAD)

Intel Atom Processor E3800 Product Family Development Kit Based on Intel Intelligent System Extended (ISX) Form Factor Reference Design

Understanding Windows To Go

80C186XL/80C188XL EMBEDDED MICROPROCESSORS SPECIFICATION UPDATE

APPLICATION NOTE Using the Intel StrataFlash Memory Write Buffer

Intel Desktop Board DP55SB

Intel IXP400 Software: Integrating STMicroelectronics* ADSL MTK20170* Chipset Firmware

Techniques for Lowering Power Consumption in Design Utilizing the Intel EP80579 Integrated Processor Product Line

Migrating from Spansion Am29F to Micron M29F NOR Flash Memories

Upgrading Intel Server Board Set SE8500HW4 to Support Intel Xeon Processors 7000 Sequence

Intel 848P Chipset. Specification Update. Intel 82848P Memory Controller Hub (MCH) August 2003

One 32-bit counter that can be free running or generate periodic interrupts

Sample for OpenCL* and DirectX* Video Acceleration Surface Sharing

Parallel NOR Flash Embedded Memory

Intel IXP400 Software Version 1.5

Revision: 0.30 June Intel Server Board S1200RP UEFI Development Kit Firmware Installation Guide

Software Evaluation Guide for WinZip 15.5*

i960 Microprocessor Performance Brief October 1998 Order Number:

How to Create a.cibd File from Mentor Xpedition for HLDRC

Intel RAID Smart Battery AXXRSBBU6

How to Create a.cibd/.cce File from Mentor Xpedition for HLDRC

Installation Guide and Release Notes

Intel Desktop Board D945GCCR

Intel X38 Express Chipset

Enabling DDR2 16-Bit Mode on Intel IXP43X Product Line of Network Processors

Intel Desktop Board D945GCLF2

Introduction. How it works

Intel Platform Innovation Framework for EFI SMBus Host Controller Protocol Specification. Version 0.9 April 1, 2004

Innovating and Integrating for Communications and Storage

Software Evaluation Guide Adobe Premiere Pro CS3 SEG

Intel 852GME/852PM Chipset Graphics and Memory Controller Hub (GMCH)

Intel 845G/845GL/845GV Chipset

Software Evaluation Guide for Photodex* ProShow Gold* 3.2

Intel Parallel Studio XE 2011 for Windows* Installation Guide and Release Notes

Parallel NOR Flash Embedded Memory

OpenCL* and Microsoft DirectX* Video Acceleration Surface Sharing

Enhanced Serial Peripheral Interface (espi)

Intel Stereo 3D SDK Developer s Guide. Alpha Release

Intel 852GME / 852PM Chipset Graphics and Memory Controller Hub (GMCH)

Intel Desktop Board DH61SA

Software Evaluation Guide for CyberLink MediaEspresso *

Intel Atom Processor E6xx Series Embedded Application Power Guideline Addendum January 2012

IQEXTENDER IQ Module. Board Manual. March Order Number:

Intel Desktop Board D946GZAB

SDK API Reference Manual for VP8. API Version 1.12

LNet Roadmap & Development. Amir Shehata Lustre * Network Engineer Intel High Performance Data Division

Intel Desktop Board DG41CN

Intel Desktop Board D975XBX2

Installation Guide and Release Notes

Intel Serial to Parallel PCI Bridge Evaluation Board

Intel RealSense Depth Module D400 Series Software Calibration Tool

Parallel NOR Flash Embedded Memory

Intel Cache Acceleration Software - Workstation

Intel 815 Chipset Family: Graphics and Memory Controller Hub (GMCH)

Parallel NOR Flash Embedded Memory

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

Serial-to-Ethernet Converter for Stellaris Microcontrollers

Intel Desktop Board D102GGC2 Specification Update

Intel Desktop Board DP67DE

Intel Desktop Board DG31PR

Intel Extreme Memory Profile (Intel XMP) DDR3 Technology

Technical Note. Migrating from S29GL-S Devices to MT28FW NOR Flash Devices. Introduction. TN-13-41: Migrating S29GL-S to MT28FW NOR Flash Devices

Using Tasking to Scale Game Engine Systems

Transcription:

Introduction Application Note Software Device Drivers for the M29Fxx Flash Memory Device Introduction This application note provides library source code in C for the M29Fxx Flash memory using the Flash software device driver interface. The M29F is available in 8-bit or 16-bit bus widths and as a top and bottom boot block device. This application note supports the devices in all possible variations and they will be referred to as the M29F, except where stated otherwise. The C code drivers work on a layer above the hardware, and can be used successfully over either bus interface. Also included in this application note is an overview of the programming model for the M29F. This will familiarize the reader with the operation of the memory devices and provide a basis for understanding and modifying the accompanying source code. The source code is written to be as platform independent as possible, and requires minimal changes by the user in order to compile and run. The application note explains how the user should modify the source code for the individual target hardware. All of the source code contains comments explaining how it is used, and why it has been written the way it has. This application note does not replace the M29Fxx data sheet. It refers to the data sheet throughout, and it is necessary to have a copy in order to follow some of the explanations. The software and accompanying documentation has been tested on a target platform, and is usable in C and C++ environments. It is small in size and can be applied to any target hardware. Application Note - Rev. B 7/10 EN 1 2010 Micron Technology, Inc. All rights reserved.

Table of Contents Introduction..........................................................................................1 M29W256 Programming Model.........................................................................3 Bus Operations and Commands......................................................................3 Status Register......................................................................................4 A Detailed Example.................................................................................4 How to Use the Software Driver.........................................................................5 General Considerations.............................................................................5 Porting the Drivers to the Target System (User Change Area)............................................6 C Library Functions Provided...........................................................................9 Getting Started (Example Quicktest).................................................................11 Software Limitations..................................................................................12 Conclusion..........................................................................................12 Revision History......................................................................................13 Disclaimer...........................................................................................14 Application Note - Rev. B 7/10 EN 2 2010 Micron Technology, Inc. All rights reserved.

M29W256 Programming Model Note: Bus Operations and Commands M29W256 Programming Model The M29F is a 16Mb (2Mb x8 or 1Mb x16) nonvolatile Flash memory that can be electrically erased and programmed through special coded command sequences on most standard microprocessor buses. The device is down into 35 blocks, each 64KB in size. The first or the last 64KB have been divided into four additional blocks: a boot block (16KB), two parameter blocks (8KB) and a block with a bigger quantity (32KB), called main block. Each block of the whole device can be erased individually. Included in the device is a Program/Erase Controller. With first generation Flash memory devices the software had to program manually all of the words to 0000h, before erasing to FFFFh, using special programming sequences. The Program/Erase Controller in the M29F allows a simpler programming model to be used, by taking care of all the necessary steps required to erase and program the memory. This has led to improved reliability so that in excess of 100,000 program/erase cycles are guaranteed per block on the device. Data with the current CPU data bus width will be referred to as elements throughout the document unless otherwise specified. Due to the flexibility of the software driver, the size of an element depends on the current configuration. Most of the functionality of the M29F is available via the two standard bus operations: read and write. Read operations retrieve data or status information from the device. Write operations are interpreted by the device as commands, which modify the behavior of the device or the data stored. Only certain special sequences of write operations are recognized as commands by the M29F. The various commands recognized by the M29F are listed in the Instructions table in the data sheet. The main commands can be grouped as follows: 1. Read 2. Read Electronic Signature 3. Erase 4. Program (Write and Program) The Read command returns the M29F to Read mode, where it behaves as a ROM. In this state, a read operation outputs, onto the data bus, the data stored at the specified address of the device. The Read Electronic Signature command places the device in a mode that allows the user to read the Electronic Signature of the device. The Electronic Signature (Manufacturer and Device Codes) is accessed by reading different addresses while in the Auto Select mode. The Erase command is used to set all the bits to 1 in every memory location in the selected block. All data previously stored in the erased block are lost. The erase command takes longer to execute than the other commands, because an entire block is erased at once. Attempts to erase or program a block without connected Vpp voltage do not modify the contents of the memory. The Word Program and the Multiple Word Program command is used to modify the data stored at the specified addresses of the device. Programming modifies one or more words at a time. Application Note - Rev. B 7/10 EN 3 2010 Micron Technology, Inc. All rights reserved.

M29W256 Programming Model Status Register While the M29F is programming or erasing, a read from the device will output the Status Register of the Program/Erase Controller. The Status Register provides valuable information about the most recent Program or Erase command. The Status Register bits are described in the Status Register Bits Table of the M29F data sheet. Their main use is to give additional information about the Flash device when program or erase fails. After a successful Program or Erase operation, the device returns automatically into Read Mode. Completion of the Program or Erase operation can be determined either from the polling bit (Status Register bit DQ7) or from the toggle bit (Status Register bit DQ6), by following the Data Polling Flow Chart or the Data Toggle Flow Chart in the data sheet. The library routines described in this application note use the Data Toggle Flow Chart. However, a function based on the Data Polling Flow Chart is also provided as an illustration. Programming or erasing errors are indicated by the error bit (Status Register bit DQ5) that is set to 1 when an error occurs. If a failure occurs, the command will not complete and read operations will continue to output the Status Register bits until a Read/Reset command is issued to the device. A Detailed Example The Command Table of the M29W160E data sheet describes the sequences of write operations that are recognized by the Program/Erase Controller as valid commands. As an example, consider the programming of the value 9465h to the address 03E2h for the M29F. The C programming language requires the user to write the following sequence (in C): where NMX_uint16 is defined as the following 16-bit value: typedef unsigned short NMX_uint16. This example assumes that address 0000h of the M29F is mapped to address 0000h in the microprocessor address space. In practice, it is likely that the Flash will have a base offset that needs to be added to the address. While the device is programming the specified address, read operations will access the Status Register bits. Status Register bit DQ5 will be 1 if an error has occurred. Bit DQ6 will toggle while programming is ongoing. Bit DQ7 will be the complement of the data being programmed Application Note - Rev. B 7/10 EN 4 2010 Micron Technology, Inc. All rights reserved.

How to Use the Software Driver General Considerations Note: How to Use the Software Driver The low-level functions (drivers) described in this application note have been provided to simplify the process of developing application code in C for the Micron M29F Flash memory device. This software driver supports the Flash device driver interface that will be implemented in all software drivers in the future. As a result, future device changes will not necessarily lead to code changes in application environments. To meet compatibility requirements, the Standard Software Driver interface allocates numbers to each block in a Flash memory starting from 0 (block 0 always has address offset 0) and up to the highest-address block number in the device. Block numbers may be described differently in the data sheets. For example, in a Flash device containing 64 blocks, the Flash device driver interface will always refer to the block with address offset 0 as block number 0, and to the last block, as block number 63. This application note gives a summary description of the Flash device driver interface. A complete description is available from your Micron distributor. With the software driver interface, users can focus on writing the high-level code required for their particular applications. The high-level code accesses the Flash memory by calling the low-level code, so users do not have to concern themselves with the details of the special command sequences. The resulting source code is both simpler and easier to maintain. Code developed using the provided drivers can be broken down into three layers: Hardware specific bus operations Low-level drivers High level functions written by the user The implementation, in C, of the hardware-specific read and write bus operations is required by the low-level drivers in order to communicate with the M29F. This implementation is hardware platform dependent. It is dependent on which microprocessor the C code runs, and where in the microprocessor s address space the memory device is located. The user must write the C functions that are appropriate to the current hardware platform. The low-level drivers take care of issuing the correct sequences of write operations for each command, and of interpreting the information received from the device during programming and erasing. These drivers encode all the specific details of how to issue commands, and how to interpret the Status Register bits. The high-level functions, written by the user, access the memory device by calling the low-level functions. When developing an application, the user is advised to proceed as follows: 1. Write a simple program to test the low-level drivers provided, and verify that these operate as expected on the user s target hardware and software environments. 2. The user should write the high-level code for the application, which accesses the Flash memory by calling the low-level drivers. 3. Test the complete application source code thoroughly. Application Note - Rev. B 7/10 EN 5 2010 Micron Technology, Inc. All rights reserved.

How to Use the Software Driver Porting the Drivers to the Target System (User Change Area) All sensible changes to the software driver that the user has to consider can be found in the header file. There is one designated area called User Change Area, which contains the following items to port the software driver to a new hardware: Basic Data Types. Check if the compiler to be used supports the following basic data types, as described in the source code, and change it where necessary: typedef unsigned char NMX_uint8; (8 bits) typedef char NMX_sint8; (8 bits) typedef unsigned short NMX_uint16; (16 bits) typedef short NMX_sint16; (16 bits) typedef unsigned int NMX_uint32; (32 bits) typedef int NMX_sint32; (32 bits) Device Type. Choose the correct device by using the appropriate define statement: #define USE_ M29FT_8 This define statement supports the M29F top boot block device in an 8-bit configuration. or #define USE_ M29FT_16 This define statement supports the M29F top boot block device in a 16-bit configuration. or #define USE_ M29FB_8 This define statement supports the M29WF bottom boot block device in an 8-bit configuration. or #define USE_ M29FB_16 This define statement supports the M29F bottom boot block device in a 16-bit configuration. Flash Memory Location. BASE_ADDR is the start address of the Flash memory. It must be set according to the target system, in order to access the Flash memory at the correct address. This value is used by the functions FlashRead() and FlashWrite(). The default value is set to zero, and must be adjusted appropriately: #define BASE_ADDR ((volatile ucpubustype*)0x00000000) Flash Configuration. Choose the correct Flash memory configuration: #define USE_8BIT_CPU_ACCESSING_1_8BIT_FLASH This define statement supports a board configuration containing a CPU with an 8-bit data-bus and a single 8-bit Flash memory device connected to it. or #define USE_16BIT_CPU_ACCESSING_2_8BIT_FLASH This define statement supports a board configuration containing a CPU with a 16-bit data-bus and two single 8-bit Flash memory devices connected to it. or Application Note - Rev. B 7/10 EN 6 2010 Micron Technology, Inc. All rights reserved.

How to Use the Software Driver #define USE_32BIT_CPU_ACCESSING_4_8BIT_FLASH This define statement supports a board configuration containing a CPU with a 32-bit data-bus and four 16-bit Flash memory devices connected to it. or #define USE_16BIT_CPU_ACCESSING_1_16BIT_FLASH This define statement supports a board configuration containing a CPU with a 16-bit data-bus and a single 16-bit Flash memory device connected to it. or #define USE_32BIT_CPU_ACCESSING_2_16BIT_FLASH This define statement supports a board configuration containing a CPU with a 32-bit data-bus and two 16-bit Flash memory devices connected to it. TimeOut. There are timeouts implemented in the loops of the code, in order to enable an exit for operations that would otherwise never terminate. There are two possibilities: 1. The Option ANSI Library functions declared in time.h exists. If the current compiler supports time.h, the define statement TIME_H_EXISTS should be activated. This ensures that the performance of the current evaluation HW does not change the timeout settings. #define TIME_H_EXISTS 2. The Option COUNT_FOR_A_SECOND) If the current compiler does not support time.h, the define statement TIME_H_EXISTS cannot be used. To overcome this constraint, the value COUNT_FOR_A_SECOND must be defined in order to create a 1-second delay. For example, if 100,000 repetitions of a loop are needed, to give a time delay of 1 second, COUNT_FOR_A_SECOND should have the value 100,000. #define COUNT_FOR_A_SECOND (chosen value). Note that this delay depends on the hardware performance and should therefore be updated every time the hardware is changed. This driver has been tested with a certain configuration and other target platforms may have other performance data. It may therefore be necessary to change the COUNT_FOR_A_SECOND value. It is up to the user to implement the correct value to prevent the code from timing out too early and allow correct completion. Pause Constant. The function Flashpause() is used in several areas of the code to generate a delay required for correct operation of the Flash device. There are two options provided: 1. The Option ANSI Library functions declared in time.h exist. If the current compiler supports time.h, the define statement TIME_H_EXISTS should be activated. This makes sure that the performance of the current evaluation HW does not change the timeout settings. #define TIME_H_EXISTS 2. The Option COUNT_FOR_A_MICROSECOND Application Note - Rev. B 7/10 EN 7 2010 Micron Technology, Inc. All rights reserved.

How to Use the Software Driver If the current compiler does not support time.h, the define statement TIME_H_EXISTS cannot be used. To overcome this constraint, the value COUNT_FOR_A_MICROSECOND must be defined in order to create a 1-microsecond delay. Depending on a While(count--!= 0); loop, a value must be found that creates the necessary delay. An approximate approach can be given by using the clock frequency of the test platform. That means if an evaluation board with 200 Mhz is used, the value for COUNT_FOR_A_MICROSECOND would be 200. The real exact value can only be found using a logic state analyzer. #define COUNT_FOR_A_MICROSECOND (chosen value). Note that this delay depends on the hardware performance and should therefore be updated every time the hardware is changed. This driver has been tested with a certain configuration and other target platforms may have other performance data. Therefore, the value may have to be changed. Additional Subroutines. #define VERBOSE In this software driver, the define statement VERBOSE is used to activate the Flash- ErrStr() function to generate a text string describing the return code from the Flash memory. Additional Considerations. The access timing data for the Flash memory device can sometimes be problematic. It may be necessary to change the FlashRead() and Flash- Write() functions if they are not compatible with the timings of the target hardware. These problems can be solved with a logic state analyzer. The programmer must take extra care when the device is accessed during an interrupt service routine. When the device is in Read mode, interrupts can freely read from the device. Interrupts that do not access the device may be used during all functions. Application Note - Rev. B 7/10 EN 8 2010 Micron Technology, Inc. All rights reserved.

C Library Functions Provided Note: C Library Functions Provided The software library provided with this application note provides the user with source code for the following functions: Flash() is used to access all chip functions, and acts as the main Flash memory interface. This function is available on all software drivers written in the Flash device driver format, and should be used exclusively. This function is guaranteed. Any unsupported functionality of the Flash memory can be detected and, therefore, malfunction can be avoided. The other functions are listed to offer a second level interface, for enhanced performance. These functions are guaranteed only in other software drivers using the same functionality. Within the Flash device driver, the functions are used always in the same way. This means that the function interface (names, return codes, parameters, data types) remains the same, independent of the Flash memory device. FlashBlockErase() is used to erase a block in the Flash. If the selected block is protected, this is ignored and no error condition is given. During the Block Erase operation, the memory will ignore all commands except the Erase Suspend and Read/Reset commands. FlashBlockProtect() is used to protect one block in the Flash. This function uses the In System Technique to protect one block. This technique requires a high voltage level on Reset/Blocks Temporary Unprotect pin RP, otherwise the function returns an error condition. FlashCheckBlockProtection() is used to check the block protection status. FlashCheckCompatibility() is used to check if the device Flash is compatible with the current device and software driver. FlashChipErase() is used to erase the whole chip. Only unprotected blocks can be deleted. Protected single blocks will be ignored and left unchanged. If all blocks are protected, the Chip Erase command will leave all blocks unchanged. FlashChipUnprotect() is used to unprotect the whole chip. This function uses the In System Technique. This technique requires a high voltage level on Reset/Blocks Temporary Unprotect pin RP, otherwise the function returns an error condition. FlashMultipleBlockErase() can be used to erase a list of one or more blocks. Only unprotected blocks can be deleted. Protected single blocks will be ignored and left unchanged. If all blocks of the list are protected, the Block Erase operation appears to start, but will leave the data within all the blocks in the list unchanged. During the Block Erase operation, the memory will ignore all commands except the Erase Suspend and Read/Reset commands. FlashProgram() is used to program data arrays into the Flash. Note that the Program command cannot change a bit set at 0 back to 1. This case will return an error code. An Erase command must be used to set all bits in a block or in the whole memory from 0 to 1. This function internally uses the commands Unlock Bypass, Unlock Bypass Program and Unlock Bypass Reset. FlashResume() is used to issue the erase resume command. FlashSuspend() is used to issue the erase suspend command. FlashRead() is used to read a value from the Flash. Application Note - Rev. B 7/10 EN 9 2010 Micron Technology, Inc. All rights reserved.

C Library Functions Provided FlashReadCfi() is used to read data from the CFI. FlashReadDeviceId() is used to read the device code. This function also ensures that all device configurations (eventually inserted on the board) reply equally. FlashReadManufacturerCode() is used to read the manufacturer code. FlashReset() is used to reset the device into the Read mode. Note that there should be no need to call this function under normal operation as all other software library functions leave the device in this mode. FlashSingleProgram() can be used to program one element to the memory array. Note that the Program command cannot change a bit set at 0 back to 1. This case will return an error code. An Erase Command must be used to set all the bits in a block or in the whole memory from 0 to 1. The functions provided in the software library rely on the user implementing the hardware specific bus operations and access timings to communicate properly with the Flash memory device. If changes in the software driver are necessary, only the two following functions need to be changed: FlashRead() is used to read a value (element) from the Flash memory. FlashWrite() is used to write a value (element) to the Flash memory. Examples of all these functions are provided in the source code (c1649.c). Application Note - Rev. B 7/10 EN 10 2010 Micron Technology, Inc. All rights reserved.

Getting Started (Example Quicktest) C Library Functions Provided To test the source code in the Target System, start by reading from the M29W160E. If it is erased, then only FFh data (or FFFFh for 16-bit data, single configuration) should be read. Next, read the manufacturer code and device ID and check that they are correct. If these functions work, it is highly likely that all the other functions work, too. However, they should all be tested thoroughly anyway. To start, it is enough to write a function main(), and to include the C file as described below. Within the main function, all the Flash memory functions can be called and executed. The following example shows a check of the device identifiers (Device ID, Manufacturer Code) and a simple BlockErase command. #include "M29Fxx.h" void main(void) { ParameterType fp; /* Contains all Flash Parameters */ ReturnType rretval; /* Return Type Enum */ Flash(ReadManufacturerCode, &fp); printf("manufacturer Code: %08Xh\r\n", fp.readmanufacturercode.ucmanufacturercode); Flash(ReadDeviceId, &fp); printf("device Code: %08Xh\r\n", fp.readdeviceid.ucdeviceid); fp.blockerase.ublblocknr = 10; /* block number 10 will be erased*/ rretval = Flash(BlockErase, &fp); /* function execution */ } /* EndFunction Main */ Application Note - Rev. B 7/10 EN 11 2010 Micron Technology, Inc. All rights reserved.

Software Limitations Software Limitations The software provided does not implement a full set of the M29Fxx s functionality. When an error occurs, the software simply returns an error message. It is left to the user to decide what to do. Either the command can be tried again, or if necessary, the device may need to be replaced. Conclusion The M29F 5V Flash memory is an ideal product for automotive and other computer systems. It is able to be easily interfaced to microprocessors and driven with simple software drivers written in the C language. With the Flash device driver interface, changeable Flash memory configurations, compiler-independent data types and a unified access for a broad range of Flash memory devices, can be introduced. Moreover, applications supporting the Flash device driver standard can use all Flash memory devices with the same interface without any code change. A simple recompilation with a new software driver is all that is necessary to control the new device. Application Note - Rev. B 7/10 EN 12 2010 Micron Technology, Inc. All rights reserved.

Revision History Revision History Rev. B..............................................................................................07/10 Applied branding and formatting. Rev. 1..............................................................................................07/09 Initial release of document. Application Note - Rev. B 7/10 EN 13 2010 Micron Technology, Inc. All rights reserved.

Disclaimer Disclaimer Please Read Carefully: INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH MICRON PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN MICRON S TERMS AND CONDITIONS OF SALE FOR SUCH PROD- UCTS, MICRON ASSUMES NO LIABILITY WHATSOEVER, AND MICRON DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF MICRON PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. Micron products are not intended for use in medical, life saving, life sustaining, critical control or safety systems, or in nuclear facility applications. Micron may make changes to specifications and product descriptions at any time, without notice. Micron Technology, Inc. may have patents or pending patent applications, trademarks, copyrights, or other intellectual property rights that relate to the presented subject matter. The furnishing of documents and other materials and information does not provide any license, express or implied, by estoppel or otherwise, to any such patents, trademarks, copyrights, or other intellectual property rights. Designers must not rely on the absence or characteristics of any features or instructions marked reserved or undefined. Micron reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. Contact your local Micron sales office or your distributor to obtain the latest specifications and before placing your product order. Copies of documents which have an order number and are referenced in this document, or other Micron literature may be obtained by visiting Micron s website at http://www.micron.com. Micron StrataFlash and Axcell are trademarks or registered trademarks of Micron or its subsidiaries in the United States and other countries. Other names and brands may be claimed as the property of others. Copyright 2010, Micron Technology, Inc., All Rights Reserved. Application Note - Rev. B 7/10 EN 14 2010 Micron Technology, Inc. All rights reserved.