Part # Application Notes Memories M28W320FCB M28W320FCT M28W640FCB M28W640FCT AN2416 datasheet

Part Manufacturer: ST Microelectronics

ST Microelectronics

Part Description: Software Drivers for M28W320FC and M28W640FC Flash memories


Part Details:

AN2416 Application note Software drivers for M28W320FCT/B and M28W640FCT/B Flash memories Introduction This application note provides library source code in C for the M28W320FCT, M28W320FCB, M28W640FCT and M28W640FCB Flash memories using the new STFL-I software driver interface V2. The M28W320FCT and M28W320FCB memories will be referred to as M28W320FC, while the M28W640FCT and M28W640FCB memories will be referred to as M28W640FC throughout the document unless otherwise specified. The source code is available from the internet site http://www.st.com or from your STMicroelectronics distributor. The c2416.c and c2416.h files contain libraries for accessing the M28W320FC and M28W640FC Flash memories. Also included in this application note is an overview of the programming model for the M28W320FC and M28W640FC devices. 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 individual target hardware. The source code contains comments throughout, explaining how it is used and why it has been written the way it has. This application note does not replace the M28W320FC and M28W640FC datasheets. It refers to them throughout, and it is necessary to have copies of the datasheets to follow some of the explanations. The software, supplied with this 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. August 2006 Rev 1 1/14 www.st.com Contents AN2416 Contents 1 Programming model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Bus Operations and Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1 Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 Read Electronic Signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.3 Erase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.4 Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.5 Program/Erase Suspend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.6 Read Common Flash Interface Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.7 Block Lock, Block Unlock and Block Lock-Down . . . . . . . . . . . . . . . . . . . . 5 3 Status register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4 A detailed example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 5 How to use the software driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 5.1 Software driver layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 5.2 High-level code written by the user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 5.3 Considerations for application developers . . . . . . . . . . . . . . . . . . . . . . . . . 8 5.4 Porting the drivers to the target system (user change area) . . . . . . . . . . . 8 5.5 C library functions provided . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 6 Getting started (Quicktest example) . . . . . . . . . . . . . . . . . . . . . . . . . . . 12


Please click the following link to download the datasheet:

Application Notes Memories M28W320FCB M28W320FCT M28W640FCB M28W640FCT AN2416.pdf Datasheet