Part # Application Notes Memories M28W160ECT M28W160ECB AN2414 datasheet

Part Manufacturer: ST Microelectronics

ST Microelectronics

Part Description: Software Drivers for M28W160ECT/ECB Flash memories


Part Details:

AN2414 Application note Software drivers for M28W160EC Flash memories Introduction This application note provides library source code in C for the M28W160ECT and M28W160ECB Flash memories using the STFL-I software driver interface V2. The M28W160ECT and M28W160ECB memories will be referred to as M28W160EC 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 c2414.c and c2414.h files contain libraries for accessing the M28W160EC Flash memories. Also included in this application note is an overview of the programming model for the M28W160EC 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 M28W160EC datasheet. 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. September 2006 Rev 1 1/14 www.st.com Contents AN2414 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 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 Porting the drivers to the target system (user change area) . . . . . . . . . . . 8 5.3 C library functions provided . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 6 Getting started (Quicktest example) . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 7 Software limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 8 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 9


Please click the following link to download the datasheet:

Application Notes Memories M28W160ECT M28W160ECB AN2414.pdf Datasheet