The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

INTRODUCTION This application note provides library source code M28W80


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



Software Drivers M28W800C, M28W160C M28W320C Flash Memories
INTRODUCTION This application note provides library source code M28W800CB, M28W800CT, M28W160CB, M28W160CT, M28W320CB M28W320CT Flash Memories. There types each Flash Memory, Boot Block Bottom Boot Block, both types covered code. Flash Memories will referred M28WxxxC throughout this document. Listings source code found this document. source code also available file form from internet site http://www.st.com from your STMicroelectronics distributor. c1203_16.c c1203_16.h files contain libraries accessing M28WxxxC Flash Memories. Also included this application note overview programming model M28WxxxC. This will familiarize reader with operation memory devices provide basis understanding modifying accompanying source code. source code written platform independent possible requires minimal changes user order compile run. application note explains user should modify source code their individual target hardware. source code backed comments explaining used been written has. This application note does replace M28WxxxC datasheet. refers datasheet throughout necessary have copy order follow some explanations. software accompanying documentation been fully tested target platform. small size applied target hardware. M28WxxxC provides hardware software functionality available Intel's Advanced Boot Block Flash Memories. Source code written Intel's Advanced Boot Block Flash Memories easily modified STMicroelectronics' M28WxxxC memory instead. M28WxxxC Flash Memory compatible with JEDEC Common Flash Interface (CFI). This interface allows software identify physical memory layout command Flash Memory. Software that compatible includes correct programming algorithm will automatically able
INTRODUCTION M28WxxxC PROGRAMMING MODEL WRITING CODE M28WxxxC LIBRARY FUNCTIONS PROVIDED PORTING DRIVERS TARGET SYSTEM LIMITATIONS SOFTWARE CONCLUSION c1203_16.h LISTING c1203_16.c LISTING
September 2001
1/31
AN1203 APPLICATION NOTE
identify operate memory. this case software drivers accompanying this application note will required. Note that software drivers provided with this application note drivers that they targeted solely M28WxxxC Flash Memory. M28WxxxC PROGRAMMING MODEL M28WxxxC electrically erased programmed through special coded command sequences most standard microprocessor buses. device broken down into different blocks varying sizes. Main Blocks 32Kb size, whereas Parameter Blocks size. Each block protected unprotected prevent allow Progam Erase commands from affecting memory, protection state volatile. M28WxxxC smart voltage device. differs from first generation devices which require supply program erase. M28WxxxC therefore easier since hardware does need cater special signal levels. voltages needed erase device generated charge pumps inside device. Three power supply pins used give optimal supply voltage conditions. simplest model three voltage supply pins supplied with 3.6V. operations available this mode. Alternatively input/output driver section (supplied VCCQ) supplied down 1.65V interface 1.8V Microcontrollers. program/erase section supplied with speed programming factory; this mode used permanent solution. Included device Program/Erase Controller. With first generation Flash Memory devices software manually program words 0000h before erasing FFFFh using special programming sequences. Program/Erase Controller M28WxxxC allows simpler programming model used, taking care necessary steps required erase program memory. This improved reliability that excess 100,000 program/erase cycles guaranteed block device. Operations Commands Most functionality M28WxxxC available standard operations: read write. Read operations retrieve data status information from device. Write operations interpreted device commands, which modify data stored behavior device. Only certain special sequences write operations recognized commands M28WxxxC. various commands recognized M28WxxxC listed Instructions Table datasheet; main commands grouped follows: Read Read Electronic Signature Erase Program Program/Erase Suspend Common Flash Interface Query Block Protect/Unprotect Read command returns M28WxxxC reset state where behaves ROM. this state, read operation outputs onto data data stored specified address device. Read Electronic Signature command places device mode which allows user read Electronic Signature Block Protection Status device. Electronic Signature (Manufacturer Device Codes) Block Protection Status accessed reading different addresses whilst Auto Select mode. library software drivers this mode known Auto Select mode make M28WxxxC compatible with series Flash Memories. Erase command used bits every memory location selected block. data previously stored erased block will lost. erase command takes longer execute than
2/31
AN1203 APPLICATION NOTE
other commands, because entire block erased once. Attempts erase program protected block generate error modify contents memory. Program command used modify data stored specified address device. Note that programming only change bits from `0'. Attempting change using Program command will fail. therefore necessary erase block before programming addresses within Programming modifies single word time. Programming larger amounts data must done word time, issuing Program command, waiting command complete, then issuing next Program command, Issuing Program/Erase Suspend command during Program Erase operation will temporarily place M28WxxxC Program/Erase Suspend mode. While Erase operation being suspended blocks being erased read programmed reset state device. While Program operation being suspended rest device read. This allows user access information stored device immediately rather than waiting until Program Erase operation completes, typically 10µs programming erasing M28WxxxC. Program Erase operation resumed when device receives Program/Erase Resume command. Common Flash Interface Query command device allows user identify number blocks addresses blocks Flash. interface also contains information relating typical maximum program erase durations. This allows user implement software timeouts instead waiting indefinitely defective Flash finish programming erasing. further information about CFI, please refer specification available from internet site (http://www.st.com) from your STMicroelectronics distributor. Blocks protected against accidental malicious Program Erase operations changing their contents. Block protection volatile; after power hardware reset blocks protected, locked. boot code lock blocks that require additional security unlock user data blocks before application runs, giving full flexible control over block protection. Status Register While M28WxxxC programming erasing, read from device will output Status Register Program/Erase Controller. Status Register, which also accessed issuing Read Status Register command, provides valuable information about most recent Program Erase command. Status Register bits described Status Register Bits Table M28WxxxC datasheet. Their main determine when programming erasing complete whether successful not. Completion Program Erase operation indicated Program/Erase Controller Status (Status Register DQ7) becoming `1'. Programming erasing errors then indicated more various error bits (Status Register bits DQ1, DQ3, DQ5) being `1'. failure occurs Status Register error bits will remain until Clear Status Register command issued device. This should done before performing further operations will possible determine whether following operation resulted error not. Detailed Example Instructions Table M28WxxxC datasheet describes sequences write operations that will recognized Program/Erase Controller valid commands. example programming 9465h address 03E2h requires user write following sequence *(unsigned int*)(0x0000) 0x0040; *(unsigned int*)(0x03E2) 0x9465; first addresses (0000h) arbitrary, long inside Flash address space. This example assumes that address 0000h M28WxxxC mapped address 0000h microproces-
3/31
AN1203 APPLICATION NOTE
address space. practice likely that Flash will have base offset which needs added address. While device programming specified address, read operations will access Status Register bits. Status Register will while programming on-going will become completion. Status Register bits DQ1, completion then Program command will have failed. Status Register bits always indicate error when attempt change been made; recommended that value memory after programming compared desired value trap this error. WRITING CODE M28WxxxC low-level functions (drivers) described this application note have been provided simplify process developing application code STMicroelectronics Flash Memories (M28WxxxC). This enables users concentrate writing high level functions required their particular applications. These high level functions access Flash Memories calling level drivers, hence keeping details special command sequences away from users' high level code: this will result source code both simpler easier maintain. Code developed using drivers provided decomposed into three layers: hardware specific operations low-level drivers high level functions written user implementation hardware specific read write operations required lowlevel drivers order communicate with M28WxxxC. This implementation hardware platform dependent affected which microprocessor code runs where microprocessor's address space memory device located. user will have write functions appropriate hardware platform (see FlashRead() FlashWrite() next section). low-level drivers take care issuing correct sequences write operations each command interpreting information received from device during programming erasing. These drivers encode specific details issue commands interpret Status Register bits. high level functions written user will access memory device calling low-level functions. keeping specific details access M28WxxxC away from high level functions, user left with code which simple easier maintain. also makes user's high level functions easier apply other STMicroelectronics Flash Memories. When developing application, user advised proceed follows: first write simple program test level drivers provided verify that these operate expected user's target hardware software environments. then user should write high level code application, which will access Flash Memories calling level drivers provided. finally test complete application source code thoroughly. LIBRARY FUNCTIONS PROVIDED software library provided with this application note provides user with source code following functions: FlashReadReset() used reset device into Read Array mode. Note that there should need call this function under normal operation other software library functions leave device this mode.
4/31
AN1203 APPLICATION NOTE
FlashAutoSelect() used identify Manufacturer Code, Device Code Block Protection Status device. function uses Read Electronic Signature mode device. function called FlashAutoSelect() make compatible with series Flash Memories. FlashReadCFI() used read word from area memory. After reading word memory returned Read mode. FlashBlockErase() used erase block device. Protected blocks cannot erased function returns error when user attempts erase protected block. Similarly, blocks cannot erased when invalid: attempting generates error leaves Flash indeterminate state. FlashChipErase() used erase entire chip. cannot erase protected blocks. some blocks protected error returned. unprotected blocks still erased. FlashProgram() used program data arrays into Flash. Only previously erased words programmed reliably. Again, protected blocks cannot programmed, programming take place when invalid. FlashBlockProtect() used protect block, preventing Program Erase operations from changing contents. FlashBlockUnprotect() used unprotect block, allowing Program Erase operations change contents. FlashBlockLock() used lock block, Protection States table datasheet. Once locked lock state block only removed through Hardware Reset. functions provided software library rely user implementing hardware specific operations. This done writing functions follows: FlashRead() must written read value from Flash. FlashWrite() must written write value Flash. example these functions provided source code. many instances these functions written macros therefore will incur function call time overhead. functions which perform basic device have been provided users have awkward systems. example where addressing system peculiar data D0.D15 device D16.D31 microprocessor. They allow user quickly adapt code virtually target system. Throughout functions assumptions have been made data types. These are: char bits byte). This case microcontrollers. Where will necessary mask unused bits word. bits bytes). Again, like char, this case will necessary variable type which bits longer mask bits above bits (particularly user's FlashRead() function). long bits bytes). necessary have arithmetic greater than bits order address entire device. approaches addressing available: desired address Flash specified linear pointer offset into device could provided user. FlashRead() functions each case would declared unsigned FlashRead( unsigned *Addr); unsigned FlashRead( unsigned long ulOff); pointer option advantage that runs faster. offset needs changed address each access this involves arithmetic. Using offset however, more portable
5/31
AN1203 APPLICATION NOTE
since resulting software easily changed microprocessors with segmented memory spaces (such 8086). maximum portability functions this application note unsigned long offset, rather than pointer. PORTING DRIVERS TARGET SYSTEM Before using software Target System user needs following: Define following depending which part fitted. source file provided defines USE_M28W800CT example. USE_M28W800CB USE_M28W800CT USE_M28W160CB USE_M28W160CT USE_M28W320CB USE_M28W320CT Write FlashRead() FlashWrite() functions appropriate Target Hardware. example FlashRead() FlashWrite() functions provided source code should give user good idea what required used many instances without much modification. test source code Target System start simply reading from M28WxxxC. erased then only FFFFh data should read. Next read Manufacturer Device codes check they correct. these functions work then likely that functions will work they should tested thoroughly. programmer needs take extra care when device accessed during interrupt service routine. situations exist which must considered: When device Read mode interrupts freely read from device. Interrupts which access device used during functions. programmer should also take care when Hardware Reset applied during Program Erase operations. Flash will left indeterminate state data could lost. LIMITATIONS SOFTWARE software provided does implement full M28WxxxC's functionality. left user implement Program/Erase Suspend command device. Double Word Program Protection Register Program commands intended programming equipment have been included these embedded drivers. Standby mode hardware feature device cannot controlled through software. Care should taken some while() loops. time-outs have been implemented. Software execution stop loops hardware error. TimeOut! comment been these places user timer them prevent software failing. software only caters device system. software more devices mechanism selecting devices will required. When error occurs software simply returns error message. left user decide what Either command tried again necessary device need replaced. CONCLUSION M28WxxxC single voltage Flash Memory ideal product embedded other computer systems, able easily interfaced microprocessors driven with simple software drivers written language.
6/31
AN1203 APPLICATION NOTE
REVISION HISTORY
Date December 2000 18-Sep-2001 Version First Issue Changes pages Boot Block numbers reversed correspond datasheet. Revision Details
7/31
AN1203 APPLICATION NOTE
/**** c1203_16.h Header File Flash Memory Filename: c1203_16.h Description: Header file c1203_16.c V1.01. Consult file details Copyright 2000 STMicroelectronics. THIS PROGRAM PROVIDED WITHOUT WARRANTY KIND,EITHER EXPRESSED IMPLIED, INCLUDING LIMITED IMPLIED WARRANTY MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM WITH YOU. SHOULD PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION. Commands various functions #define FLASH_BLOCK_LOCKED_PROTECTED (0x03) #define FLASH_BLOCK_LOCKED (0x02) #define FLASH_BLOCK_PROTECTED (0x01) #define FLASH_BLOCK_UNPROTECTED (0x00) #define FLASH_READ_MANUFACTURER #define FLASH_READ_DEVICE_CODE (-2) (-1)
Error Conditions return values. file explanations help #define FLASH_SUCCESS (-1) #define FLASH_BLOCK_INVALID (-5) #define FLASH_PROGRAM_FAIL (-6) #define FLASH_OFFSET_OUT_OF_RANGE (-7) #define FLASH_WRONG_TYPE (-8) #define FLASH_BLOCK_FAILED_ERASE (-9) #define FLASH_UNPROTECTED (-10) #define FLASH_PROTECTED (-11) #define FLASH_FUNCTION_NOT_SUPPORTED (-12) #define FLASH_VPP_INVALID (-13) #define FLASH_ERASE_FAIL (-14) #define FLASH_UNPROTECT_FAIL (-16) #define FLASH_PROTECT_FAIL (-18) #define FLASH_CFI_FAIL (-19) #define FLASH_LOCKED (-20) #define FLASH_LOCK_FAIL (-21) Function Prototypes extern unsigned FlashRead( unsigned long ulOff extern void FlashReadReset( void extern FlashAutoSelect( iFunc extern FlashReadCFI( iCFIFunc, unsigned *uCFIValue extern FlashBlockErase( unsigned char ucBlock extern FlashChipErase( *iResults extern FlashBlockProtect(unsigned char ucBlock); extern FlashBlockLock(unsigned char ucBlock);
8/31
AN1203 APPLICATION NOTE
extern FlashBlockUnprotect(unsigned char ucBlock); extern FlashProgram( unsigned long ulOff, size_t NumWords, void *Array extern char *FlashErrorStr( iErrNum
9/31
AN1203 APPLICATION NOTE
/**** c1203_16.c M28WxxxC Flash Memory Driver Filename: c1203_16.c Description: Library routines M28WxxxC Flash Memory. Version: Date: Author: 1.00 Initial release. 10/11/2000 Webster, Oxford Technical Solutions (www.ots.ndirect.co.uk)
Copyright 2000 STMicroelectronics. THIS PROGRAM PROVIDED WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING LIMITED IMPLIED WARRANTY MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM WITH YOU. SHOULD PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION. Version History. Ver. 0.00 1.00 Date Comments
18/09/2000 Initial creation 25/09/2000 Software tested using M28W032CB.
This source file provides library code using M28WxxxC devices. following devices supported code: M28W800CT M28W800CB M28W160CT M28W160CB M28W320CT M28W320CB following functions available this library: FlashReadReset() FlashAutoSelect() FlashReadCFI() FlashBlockErase() FlashChipErase() FlashBlockProtect() FlashBlockLock() FlashBlockUnprotect() FlashProgram() FlashErrorStr() reset flash normal memory access information about device read information from flash erase single block erase whole chip protect block flash lock block prevent being unprotected unprotect block flash program word array return error string error
further information consult Data Sheet Application Note. Application Note gives information about modify this code specific application. hardware specific functions which need modified user are: FlashWrite() writing word flash FlashRead() reading word from flash
10/31
AN1203 APPLICATION NOTE
list error conditions code. There timeouts implemented loops code. each point where infinite loop implemented comment TimeOut! been placed. user implement these avoid code hanging instead timing out. source code assumes that compiler implements numerical types unsigned char unsigned unsigned long bits bits bits
Additional changes code will necessary these correct. #include <stdlib.h> #include "c1203_16.h" #define USE_M28W320CB Constants #define MANUFACTURER_ST (0x0020) RSIG manufacturer always 0x20 #define BASE_ADDR ((volatile unsigned int*)0x0000) BASE_ADDR base address flash, functions FlashRead FlashWrite(). Some applications which require more complicated FlashRead() FlashWrite() BASE_ADDR #define ANY_ADDR (0x0000L) address offset within Flash Memory will #ifdef USE_M28W800CT #define EXPECTED_DEVICE (0x88CC) Device code M28W800CT #define FLASH_SIZE (0x80000L) 512K #endif #ifdef USE_M28W800CB #define EXPECTED_DEVICE (0x88CD) Device code M28W800CB #define FLASH_SIZE (0x80000L) 512K #endif #ifdef USE_M28W160CT #define EXPECTED_DEVICE (0x88CE) Device code M28W160CT #define FLASH_SIZE (0x100000L) #endif #ifdef USE_M28W160CB #define EXPECTED_DEVICE (0x88CF) Device code M28W160CB #define FLASH_SIZE (0x100000L) #endif #ifdef USE_M28W320CT #define EXPECTED_DEVICE (0x88BA) Device code M28W160CT #define FLASH_SIZE (0x200000L) #endif Header file with global prototypes
11/31
AN1203 APPLICATION NOTE
#ifdef USE_M28W320CB #define EXPECTED_DEVICE (0x88BB) Device code M28W160CB #define FLASH_SIZE (0x200000L) #endif #ifdef USE_M28W800CT Block organisation Boot Block devices static const unsigned long BlockOffset[] 0x00000L, Start offset block 0x08000L, Start offset block 0x10000L, Start offset block 0x18000L, Start offset block 0x20000L, Start offset block 0x28000L, Start offset block 0x30000L, Start offset block 0x38000L, Start offset block 0x40000L, Start offset block 0x48000L, Start offset block 0x50000L, Start offset block 0x58000L, Start offset block 0x60000L, Start offset block 0x68000L, Start offset block 0x70000L, Start offset block 0x78000L, Start offset block 0x79000L, Start offset block 0x7A000L, Start offset block 0x7B000L, Start offset block 0x7C000L, Start offset block 0x7D000L, Start offset block 0x7E000L, Start offset block 0x7F000L Start offset block #endif USE_M28W800CT #ifdef USE_M28W800CB Block organisation Bottom Boot Block devices static const unsigned long BlockOffset[] 0x00000L, Start offset block 0x01000L, Start offset block 0x02000L, Start offset block 0x03000L, Start offset block 0x04000L, Start offset block 0x05000L, Start offset block 0x06000L, Start offset block 0x07000L, Start offset block 0x08000L, Start offset block 0x10000L, Start offset block 0x18000L, Start offset block 0x20000L, Start offset block 0x28000L, Start offset block 0x30000L, Start offset block 0x38000L, Start offset block 0x40000L, Start offset block 0x48000L, Start offset block 0x50000L, Start offset block 0x58000L, Start offset block
12/31
AN1203 APPLICATION NOTE
0x60000L, 0x68000L, 0x70000L, 0x78000L Start Start Start Start offset offset offset offset block block block block
#endif USE_M28W800CB #ifdef USE_M28W160CT Block organisation Boot Block devices static const unsigned long BlockOffset[] 0x00000L, Start offset block 0x08000L, Start offset block 0x10000L, Start offset block 0x18000L, Start offset block 0x20000L, Start offset block 0x28000L, Start offset block 0x30000L, Start offset block 0x38000L, Start offset block 0x40000L, Start offset block 0x48000L, Start offset block 0x50000L, Start offset block 0x58000L, Start offset block 0x60000L, Start offset block 0x68000L, Start offset block 0x70000L, Start offset block 0x78000L, Start offset block 0x80000L, Start offset block 0x88000L, Start offset block 0x90000L, Start offset block 0x98000L, Start offset block 0xA0000L, Start offset block 0xA8000L, Start offset block 0xB0000L, Start offset block 0xB8000L, Start offset block 0xC0000L, Start offset block 0xC8000L, Start offset block 0xD0000L, Start offset block 0xD8000L, Start offset block 0xE0000L, Start offset block 0xE8000L, Start offset block 0xF0000L, Start offset block 0xF8000L, Start offset block 0xF9000L, Start offset block 0xFA000L, Start offset block 0xFB000L, Start offset block 0xFC000L, Start offset block 0xFD000L, Start offset block 0xFE000L, Start offset block 0xFF000L Start offset block #endif USE_M28W160CT #ifdef USE_M28W160CB Block organisation Bottom Boot Block devices static const unsigned long BlockOffset[] 0x00000L, Start offset block 0x01000L, Start offset block
13/31
AN1203 APPLICATION NOTE
0x02000L, 0x03000L, 0x04000L, 0x05000L, 0x06000L, 0x07000L, 0x08000L, 0x10000L, 0x18000L, 0x20000L, 0x28000L, 0x30000L, 0x38000L, 0x40000L, 0x48000L, 0x50000L, 0x58000L, 0x60000L, 0x68000L, 0x70000L, 0x78000L, 0x80000L, 0x88000L, 0x90000L, 0x98000L, 0xA0000L, 0xA8000L, 0xB0000L, 0xB8000L, 0xC0000L, 0xC8000L, 0xD0000L, 0xD8000L, 0xE0000L, 0xE8000L, 0xF0000L, 0xF8000L Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block
#endif USE_M28W160CB #ifdef USE_M28W320CT Block organisation Boot Block devices static const unsigned long BlockOffset[] 0x000000L, Start offset block 0x008000L, Start offset block 0x010000L, Start offset block 0x018000L, Start offset block 0x020000L, Start offset block 0x028000L, Start offset block 0x030000L, Start offset block 0x038000L, Start offset block 0x040000L, Start offset block 0x048000L, Start offset block 0x050000L, Start offset block 0x058000L, Start offset block 0x060000L, Start offset block 0x068000L, Start offset block 0x070000L, Start offset block
14/31
AN1203 APPLICATION NOTE
0x078000L, 0x080000L, 0x088000L, 0x090000L, 0x098000L, 0x0A0000L, 0x0A8000L, 0x0B0000L, 0x0B8000L, 0x0C0000L, 0x0C8000L, 0x0D0000L, 0x0D8000L, 0x0E0000L, 0x0E8000L, 0x0F0000L, 0x0F8000L, 0xF00000L, 0x108000L, 0x110000L, 0x118000L, 0x120000L, 0x128000L, 0x130000L, 0x138000L, 0x140000L, 0x148000L, 0x150000L, 0x158000L, 0x160000L, 0x168000L, 0x170000L, 0x178000L, 0x180000L, 0x188000L, 0x190000L, 0x198000L, 0x1A0000L, 0x1A8000L, 0x1B0000L, 0x1B8000L, 0x1C0000L, 0x1C8000L, 0x1D0000L, 0x1D8000L, 0x1E0000L, 0x1E8000L, 0x1F0000L, 0x1F8000L, 0x1F9000L, 0x1FA000L, 0x1FB000L, 0x1FC000L, 0x1FD000L, 0x1FE000L, 0x1FF000L Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block block
#endif USE_M28W320CT
15/31
AN1203 APPLICATION NOTE
#ifdef USE_M28W320CB Block organisation Bottom Boot Block devices static const unsigned long BlockOffset[] 0x000000L, Start offset block 0x001000L, Start offset block 0x002000L, Start offset block 0x003000L, Start offset block 0x004000L, Start offset block 0x005000L, Start offset block 0x006000L, Start offset block 0x007000L, Start offset block 0x008000L, Start offset block 0x010000L, Start offset block 0x018000L, Start offset block 0x020000L, Start offset block 0x028000L, Start offset block 0x030000L, Start offset block 0x038000L, Start offset block 0x040000L, Start offset block 0x048000L, Start offset block 0x050000L, Start offset block 0x058000L, Start offset block 0x060000L, Start offset block 0x068000L, Start offset block 0x070000L, Start offset block 0x078000L, Start offset block 0x080000L, Start offset block 0x088000L, Start offset block 0x090000L, Start offset block 0x098000L, Start offset block 0x0A0000L, Start offset block 0x0A8000L, Start offset block 0x0B0000L, Start offset block 0x0B8000L, Start offset block 0x0C0000L, Start offset block 0x0C8000L, Start offset block 0x0D0000L, Start offset block 0x0D8000L, Start offset block 0x0E0000L, Start offset block 0x0E8000L, Start offset block 0x0F0000L, Start offset block 0x0F8000L, Start offset block 0x100000L, Start offset block 0x108000L, Start offset block 0x110000L, Start offset block 0x118000L, Start offset block 0x120000L, Start offset block 0x128000L, Start offset block 0x130000L, Start offset block 0x138000L, Start offset block 0x140000L, Start offset block 0x148000L, Start offset block 0x150000L, Start offset block 0x158000L, Start offset block 0x160000L, Start offset block 0x168000L, Start offset block 0x170000L, Start offset block 0x178000L, Start offset block
16/31
AN1203 APPLICATION NOTE
0x180000L, 0x188000L, 0x190000L, 0x198000L, 0x1A0000L, 0x1A8000L, 0x1B0000L, 0x1B8000L, 0x1C0000L, 0x1C8000L, 0x1D0000L, 0x1D8000L, 0x1E0000L, 0x1E8000L, 0x1F0000L, 0x1F8000L Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start Start offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset block block block block block block block block block block block block block block block block
#endif USE_M28W320CB #define NUM_BLOCKS Static Prototypes following function only needed this module. static unsigned FlashWrite( unsigned long ulOff, unsigned uVal Function: unsigned FlashWrite( unsigned long ulOff, unsigned uVal Arguments: ulOff word offset flash write uVal value written Returns: uVal Description: This function used write word flash. many microprocessor systems macro used instead, increasing speed flash routines. example: #define FlashWrite( ulOff, uVal BASE_ADDR[ulOff] (unsigned int) uVal function used here instead allow user expand necessary. function made return uVal that compatible with macro. Pseudo Code: Step Write uVal word offset flash Step return uVal static unsigned FlashWrite( unsigned long ulOff, unsigned uVal Step1, Write uVal word offset flash return return BASE_ADDR[ulOff] uVal; Function: unsigned FlashRead( unsigned long ulOff Arguments: ulOff word offset into flash read from. Returns: unsigned word offset Description: This function used read word from flash. many microprocessor systems macro used instead, increasing speed flash routines. example:
17/31
AN1203 APPLICATION NOTE
#define FlashRead( ulOff BASE_ADDR[ulOff] function used here instead allow user expand necessary. Pseudo Code: Step Return value word offset ulOff unsigned FlashRead( unsigned long ulOff Step Return value word offset ulOff return BASE_ADDR[ulOff]; Function: void FlashReadReset( void Arguments: none Return Value: none Description: This function places flash Read Array mode described Data Sheet. this mode flash read normal memory. other functions leave flash Read Array mode this strictly necessary. provided completeness. Pseudo Code: Step write command sequence (see Instructions Table Data Sheet) void FlashReadReset( void Step write command sequence FlashWrite( ANY_ADDR, 0x00FF Function: FlashAutoSelect( iFunc Arguments: iFunc should Read Signature values. header file defines values reading Signature. Return Value: When iFunc FLASH_READ_MANUFACTURER (-2) function returns manufacturer's code. Manufacturer code 0020h. When iFunc FLASH_READ_DEVICE_CODE (-1) function returns Device Code. device codes parts are: M28W800CT 88CCh M28W800CB 88CDh M28W160CT 88CEh M28W160CB 88CFh M28W320CT 88BAh M28W320CB 88BBh When iFunc invalid function returns FLASH_FUNCTION_NOT_SUPPORTED (-12) Description: This function used read electronic signature device manufacturer code. Note: command sequence given here described Data Sheet. addresses commands applicable series FLASH devices. only command required M28WxxxC final one, 0x0090 command (Read Electronic Signature Command). other writes command interface will ignored M28WxxxC. advantage this that FlashAutoSelect() function will able identify series Flash devices WELL series Flash devices. Unlike many other Flash Memories, important ensure
18/31
AN1203 APPLICATION NOTE
when reading manufacturer device codes M28WxxxC uses bits access Protection Register. Pseudo Code: Step Send Auto Select Instruction device RSIG instruction Step Read required function from device Step Return device Read Array mode FlashAutoSelect( iFunc iRetVal; Holds return value Step Send Read Electronic Signature instruction FlashWrite( 0x5555L, 0x00AA Cycle, ignored series devices FlashWrite( 0x2AAAL, 0x0055 Cycle, ignored series devices FlashWrite( 0x5555L, 0x0090 Cycle Step Read required function iFunc FLASH_READ_MANUFACTURER iRetVal FlashRead( 0x0000L else iFunc FLASH_READ_DEVICE_CODE iRetVal FlashRead( 0x0001L else (iFunc (iFunc NUM_BLOCKS) iRetVal (FlashRead( BlockOffset[iFunc] 0x0002L else iRetVal FLASH_BLOCK_INVALID; Step Return Read Array mode FlashWrite( ANY_ADDR, 0x00FF return iRetVal; Function: FlashReadCFI( iCFIFunc, unsigned *uCFIValue Arguments: iCFIFunc offset parameter read. value read from offset iCFIFunc passed back calling function *uCFIValue. Return Value: success returns FLASH_SUCCESS (-1) cannot identified reading chracters from locations 0x10, 0x11 0x12, function returns FLASH_CFI_FAIL (-19) Description: This function checks that flash present operable, then reads value specified offset. value requested then passed back calling function. Note: Pseudo Code: Step Send Read Instruction Step Check that interface operable Step operable read required value Step Return flash Read Array mode FlashReadCFI( iCFIFunc, unsigned *uCFIValue iRetVal FLASH_SUCCESS; Holds return value unsigned long ulCFIAddr; Holds address
19/31
AN1203 APPLICATION NOTE
Step Send Read Instruction FlashWrite( 0x0055L, 0x0098 Step Check that interface operable (FlashRead( 0x0010L (FlashRead( 0x0011L !='R' (FlashRead( 0x0012L iRetVal=FLASH_CFI_FAIL; else Step Read required ulCFIAddr (unsigned long)iCFIFunc; *uCFIValue FlashRead( ulCFIAddr 0x00FFL Step Return Read Array mode FlashWrite( ANY_ADDR, 0x00FF return iRetVal; Function: FlashBlockErase( unsigned char ucBlock Arguments: ucBlock number Block erased. Return Value: function returns following conditions: FLASH_SUCCESS (-1) FLASH_WRONG_TYPE (-8) FLASH_BLOCK_INVALID (-5) FLASH_PROTECTED (-11) FLASH_VPP_INVALID (-13) FLASH_BLOCK_FAILED_ERASE (-9) Description: This function used erase Block specified ucBlock. function checks that block valid before issuing erase command. Once erase completed function checks Status Register errors. errors returned, otherwise FLASH_SUCCESS returned. Pseudo Code: Step Check correct flash type Step Check that block valid Step Issue Erase Command Step Wait until Program/Erase Controller ready Step Check errors Step Return Read Array mode Step Return error condition FlashBlockErase( unsigned char ucBlock iRetVal FLASH_SUCCESS; Holds return value: optimistic initially! unsigned uStatus; Holds Status Register reads Step Check correct flash type !(FlashAutoSelect( FLASH_READ_MANUFACTURER MANUFACTURER_ST) !(FlashAutoSelect( FLASH_READ_DEVICE_CODE EXPECTED_DEVICE return FLASH_WRONG_TYPE; Step Check that block valid ucBlock NUM_BLOCKS return FLASH_BLOCK_INVALID;
20/31
AN1203 APPLICATION NOTE
Step Issue Erase Command FlashWrite( ANY_ADDR, 0x0050 Clear Status Register NOTE also clears well b3,4 FlashWrite( ANY_ADDR, 0x0020 cycle FlashWrite( BlockOffset[ucBlock], 0x00D0 cycle Step Wait until Program/Erase Controller ready TimeOut! uStatus FlashRead(ANY_ADDR); while( (uStatus&0x0080) 0x0000 Step Check errors uStatus&0x0002 iRetVal FLASH_PROTECTED; else uStatus&0x0008 iRetVal FLASH_VPP_INVALID; else uStatus&0x0020 iRetVal FLASH_BLOCK_FAILED_ERASE; Step Return Read Array mode FlashWrite( ANY_ADDR, 0x0050 Clear Status Register
NOTE also clears well b3,4 FlashWrite( ANY_ADDR, 0x00FF Step Return error condition return iRetVal; Function: FlashChipErase( *iResults Arguments: iResults pointer array where results will stored. iResults NULL then results stored. Return Value: function returns following conditions: FLASH_SUCCESS (-1) FLASH_WRONG_TYPE (-8) FLASH_ERASE_FAIL (-14) FLASH_SUCCESS returned then Results left unchanged. FLASH_ERASE_FAIL returned then Results will filled with error conditions each block. possible error conditions are: FLASH_SUCCESS (-1) FLASH_PROTECTED (-11) FLASH_VPP_INVALID (-13) FLASH_ERASE_FAIL (-14) Description: function used erase whole flash chip. Each Block erased turn. function only returns when Blocks have been erased have generated error, except FLASH_VPP_INVALID encountered, which case function aborts reports remaining blocks having FLASH_VPP_INVALID. invalid block then follows that will invalid subsequent blocks (battery failure?). Pseudo Code: Step Check correct flash type Step each block Read Array Command
21/31
AN1203 APPLICATION NOTE
Step Send Block Erase Command Step Register errors array Step FLASH_VPP_INVALID returned fill rest results array abort Step Return error condition FlashChipErase( *iResults unsigned char ucCurBlock; Used track current block range iRetVal FLASH_SUCCESS; Return value: Initially optimistic iError; Holds latest error Step Check correct flash type !(FlashAutoSelect( FLASH_READ_MANUFACTURER MANUFACTURER_ST) !(FlashAutoSelect( FLASH_READ_DEVICE_CODE EXPECTED_DEVICE return FLASH_WRONG_TYPE; Step each block for( ucCurBlock ucCurBlock NUM_BLOCKS; ucCurBlock++ Step Send Block Erase Command iError FlashBlockErase( ucCurBlock iError FLASH_SUCCESS iRetVal FLASH_ERASE_FAIL; Step Register errors array iResults NULL iResults[ucCurBlock] iError; Step FLASH_VPP_INVALID returned fill rest results array abort iError FLASH_VPP_INVALID iResults NULL while( ++ucCurBlock NUM_BLOCKS remaining blocks iResults[ucCurBlock] iError; fill error for() loop will terminate since ucCurBlock NUM_BLOCKS Step Return error condition return iRetVal; Function: FlashBlockUnprotect(unsigned char ucBlock) Arguments: ucBlock holds block number unprotect Return Value: function returns following conditons: FLASH_WRONG_TYPE (-8) FLASH_SUCCESS (-1) FLASH_UNPROTECT_FAIL (-16) FLASH_UNPROTECTED (-10) FLASH_BLOCK_INVALID (-5) Description: This function unprotects block selected ucBlock only that particular block protected valid. block unprotect command then written then checked ensure that successful. Pseudo Code: Step Check correct flash type Step Check block number ucBlock valid
22/31
AN1203 APPLICATION NOTE
Step Check block really needs unprotecting already unprotected Step Unprotect block Step Check block ucBlock protection status Step Check errors FlashBlockUnprotect(unsigned char ucBlock) iRetVal; Store result Step Check correct flash type !(FlashAutoSelect( FLASH_READ_MANUFACTURER MANUFACTURER_ST) !(FlashAutoSelect( FLASH_READ_DEVICE_CODE EXPECTED_DEVICE return FLASH_WRONG_TYPE; iRetVal FlashAutoSelect( (int)ucBlock Step (iRetVal FLASH_BLOCK_INVALID) return FLASH_BLOCK_INVALID; Step else (iRetVal FLASH_BLOCK_UNPROTECTED) return FLASH_UNPROTECTED; Step Unprotect block FlashWrite(ANY_ADDR,0x0060); 0x00D0); Step Check block ucBlock protection status iRetVal FlashAutoSelect( (int)ucBlock Step Check errors ((iRetVal FLASH_BLOCK_PROTECTED) (iRetVal FLASH_BLOCK_LOCKED_PROTECTED)) return FLASH_UNPROTECT_FAIL; else return FLASH_SUCCESS; Function: FlashBlockProtect(unsigned char ucBlock) Arguments: ucBlock holds block number protect Return Value: function returns following conditons: FLASH_WRONG_TYPE (-8) FLASH_SUCCESS (-1) FLASH_PROTECT_FAIL (-18) FLASH_PROTECTED (-11) FLASH_BLOCK_INVALID (-5) Description: This function protects block selected ucBlock only that particular block unprotected valid. block protect command then written then checked ensure that successful. Pseudo Code: Step Check correct flash type Step Check block number ucBlock valid Step Check block really needs unprotecting already unprotected Step Unprotect block Step Read block ucBlock check protection status Step Check error condition
23/31
AN1203 APPLICATION NOTE
FlashBlockProtect(unsigned char ucBlock) iRetVal; Store result Step Check correct flash type !(FlashAutoSelect( FLASH_READ_MANUFACTURER MANUFACTURER_ST) !(FlashAutoSelect( FLASH_READ_DEVICE_CODE EXPECTED_DEVICE return FLASH_WRONG_TYPE; iRetVal FlashAutoSelect( (int)ucBlock Step (iRetVal FLASH_BLOCK_INVALID) return FLASH_BLOCK_INVALID; Step else if((iRetVal FLASH_BLOCK_PROTECTED) (iRetVal FLASH_BLOCK_LOCKED_PROTECTED)) return FLASH_PROTECTED; Step Protect block FlashWrite(ANY_ADDR,0x0060); 0x0001); Step Check block ucBlock protection status iRetVal FlashAutoSelect( (int)ucBlock Step Check errors (iRetVal FLASH_BLOCK_PROTECTED) return FLASH_PROTECT_FAIL; else return FLASH_SUCCESS; Function: FlashBlockLock(unsigned char ucBlock) Arguments: ucBlock holds block number lock Return Value: function returns following conditons: FLASH_LOCKED (-20) success FLASH_LOCK_FAIL (-21) locking unsuccessful FLASH_BLOCK_INVALID (-5) block valid Description: This function locks block selected ucBlock only that particular block valid. then tests lock command successful. Pseudo Code: Step Check correct flash type Step Check block number ucBlock valid Step Check block really needs locking already locked Step Lock block Step Check that locked FlashBlockLock(unsigned char ucBlock) Step Check correct flash type !(FlashAutoSelect( FLASH_READ_MANUFACTURER MANUFACTURER_ST) !(FlashAutoSelect( FLASH_READ_DEVICE_CODE EXPECTED_DEVICE return FLASH_WRONG_TYPE;
24/31
AN1203 APPLICATION NOTE
Step block valid (FlashAutoSelect( (int)ucBlock FLASH_BLOCK_INVALID) return FLASH_BLOCK_INVALID; Step lock block already locked (((FlashAutoSelect( (int)ucBlock 0x02) FLASH_BLOCK_LOCKED) return FLASH_LOCKED; Step Lock block FlashWrite(ANY_ADDR,0x0060); 0x002F); Step Check that locked (((FlashAutoSelect( (int)ucBlock 0x02) FLASH_BLOCK_LOCKED) return FLASH_SUCCESS; else return FLASH_LOCK_FAIL; Function: FlashProgram( unsigned long ulOff, size_t NumWords, void *Array Arguments: ulOff word offset into flash programmed NumWords holds number words array. Array pointer array programmed. Return Value: success function returns FLASH_SUCCESS (-1). protected address given function returns FLASH_PROTECTED (-11). invalid then function returns FLASH_VPP_INVALID (-13) failure function returns FLASH_PROGRAM_FAIL (-6). address range programmed exceeds address range Flash Device function returns FLASH_ADDRESS_OUT_OF_RANGE (-7) nothing programmed. wrong type flash detected then FLASH_WRONG_TYPE (-8) returned nothing programmed. Description: This function used program array into flash. does erase flash first will fail block(s) erased first. Pseudo Code: Step Check correct flash type Step Check offset range valid Step While there more programmed Step Program next word Step Wait until Program/Erase Controller ready Step Check errors Step Update pointers Step Step Clear status register return read array mode Step Return error condition FlashProgram( unsigned long ulOff, size_t NumWords, void *Array unsigned *uArrayPointer; unsigned access array unsigned long ulLastOff; Holds last offset programmed unsigned uStatus; Holds Status Register reads iRetVal FLASH_SUCCESS; Return Value: Initially optimistic Step Check that flash correct type !(FlashAutoSelect( FLASH_READ_MANUFACTURER MANUFACTURER_ST) !(FlashAutoSelect( FLASH_READ_DEVICE_CODE EXPECTED_DEVICE
25/31
AN1203 APPLICATION NOTE
return FLASH_WRONG_TYPE; Step Check offset range valid ulLastOff ulOff NumWords ulLastOff FLASH_SIZE return FLASH_OFFSET_OUT_OF_RANGE; Step While there more programmed uArrayPointer (unsigned *)Array; while( ulOff ulLastOff iRetVal FLASH_SUCCESS Step Program next word FlashWrite( ANY_ADDR, 0x0050 Clear Status Register FlashWrite( ANY_ADDR, 0x0040 Program Set-up FlashWrite( ulOff, *uArrayPointer Program value Step Wait until Program/Erase Controller ready TimeOut! uStatus FlashRead(ANY_ADDR); while( (uStatus&0x0080) 0x0000 Step Check errors uStatus&0x0002 iRetVal FLASH_PROTECTED; else uStatus&0x0008 iRetVal FLASH_VPP_INVALID; else uStatus&0x0010 iRetVal FLASH_PROGRAM_FAIL; Step Update pointers ulOff++; next word offset uArrayPointer++; next word array Step Clear status register return read array mode FlashWrite( ANY_ADDR, 0x0050 Clear Status Register NOTE also clears well b3,4 FlashWrite( ANY_ADDR, 0x00FF Read Array Command Step return error condition return iRetVal; Function: char *FlashErrorStr( iErrNum Arguments: iErrNum error number returned from another Flash Routine Return Value: pointer string with error message Description: This function used generate text string describing error from flash. Call with return value from another flash routine. Pseudo Code: Step Check error message range. Step Return correct string. char *FlashErrorStr( iErrNum
26/31
AN1203 APPLICATION NOTE
static char *str[] "Flash Success", "Flash Poll Failure", "Flash Many Blocks", "MPU slow erase blocks", "Flash Block selected invalid", "Flash Program Failure", "Flash Address Offset Range", "Flash Wrong Type", "Flash Block Failed Erase", "Flash Unprotected", "Flash Protected", "Flash function supported", "Flash Invalid", "Flash Erase Fail", "Flash Toggle Flow Chart Failure", "Flash Unprotect failed", "Flash Bank Invalid", "Flash Protect Failed", "Flash Query Failed", "Flash Locked", "Flash Lock Failed" Step Check error message range iErrNum -iErrNum errors negative: make adjust iErrNum iErrNum sizeof(str)/sizeof(str[0])) Check range return "Unknown Error\n"; Step Return correct string else return str[iErrNum]; List Errors Return values, Explanations Help. Return Name: FLASH_SUCCESS Return Value: Description: This value indicates that flash command executed correctly. Error Name: FLASH_POLL_FAIL Notes: Applies series FLASH only. This error condition should occur when using this library. Return Value: Description: Program/Erase Controller algorithm managed complete command operation successfully. This because device damaged Solution: command again. fails second time then likely that device will need replaced. Error Name: Notes: occur when Return Value: Description: FLASH_TOO_MANY_BLOCKS Applies series FLASH only. This error condition should using this library. user chosen erase more blocks than device has.
27/31
AN1203 APPLICATION NOTE
This because array blocks erase contains same block more than once. Solutions: Check that program trying erase valid blocks. device will only have NUM_BLOCKS blocks (defined file). Also check that same block been added twice more array. Error Name: FLASH_MPU_TOO_SLOW Notes: Applies series FLASH only. This error condition should occur when using this library. Return Value: Description: managed write selected blocks device before timeout period expired. BLOCK ERASE COMMAND section Data Sheet details. Solutions: this occurs occasionally then because interrupt occuring between writing blocks erased. Search "DSI!" code disable interrupts during time critical sections. this error condition always occurs then time faster microprocessor, better optimising compiler worse still, learn assembly. immediate solution only erase block time. Disable test #define'ing code) always call function with block time. Error Name: FLASH_BLOCK_INVALID Return Value: Description: request invalid block been made. Valid blocks number from NUM_BLOCKS-1. Solution: Check that block valid range. Error Name: FLASH_PROGRAM_FAIL Return Value: Description: programmed value been programmed correctly. Solutions: Make sure that block containing value erased before programming. erasing block re-programming value. fails again then device have blocks protected. also possible block locked unlikely kept high. program fail still results likely that flash suspect. Error Name: FLASH_OFFSET_OUT_OF_RANGE Return Value: Description: address offset given range device. Solution: Check address offset valid range. Error Name: FLASH_WRONG_TYPE Return Value: Description: source code been used access wrong type flash. Solutions: different flash chip with target hardware contact STMicroelectronics different source code library. Error Name: FLASH_BLOCK_FAILED_ERASE Return Value: Description: previous erase this block managed successfully erase block. Solution: block protected/locked flash suspect.
28/31
AN1203 APPLICATION NOTE
Return Name: FLASH_UNPROTECTED Return Value: Description: user requested unprotect block that already unprotected. This just warning user that their operation make changes necessary. Error Name: FLASH_PROTECTED Return Value: Description: user attempted erase, program protect block flash that protected. operation failed because block protected. Solutions: Choose another (unprotected) block erasing programming. Alternatively change block protection status current block. (see Datasheet more details). case user protecting block that already protected, this warning notifies user that command effect. Return Name: FLASH_FUNCTION_NOT_SUPPORTED Return Value: Description: user attempted make functionality available this flash device (and thus provided software drivers). This simply warning user. Error Name: FLASH_VPP_INVALID Notes: Applies series Flash only. Return Value: Description: Program Block Erase been attempted with supply voltage outside allowed ranges. This command effect since invalid effect protecting whole flash device. Solution: (hardware) configuration will need modified make programming erasing device possible. Error Name: FLASH_ERASE_FAIL Return Value: Description: This indicates that previous erasure whole device failed. Solution: Investigate this failure further attempting erase each block individually. erasing single block still causes failure, then Flash sadly needs replacing. Error Name: Flash_TOGGLE_FAIL Return Value: Notes: Applies series Flash only. This error condition should occur when using this library. Description: Program/Erase Controller algorithm managed complete command operation successfully. This because device damaged. Solution: command again. fails second time then likely that device will need replaced. Error Name: Flash_UNPROTECT_FAIL
29/31
AN1203 APPLICATION NOTE
Return Value: Description: This error return value indicates that block unprotect command unsuccessful. Solution: command again. fails second time then likely that device either locked will need replaced. (Part unlocked protected power-up with V_high). Error Name: Flash_BANK_INVALID Return Value: Notes: This applies M59DRxxx series Flash only. Description: This error return value indicates that bank does exist. Error Name: Flash_PROTECT_FAIL Return Value: Description: This error return value indicates that block protect command unsuccessful. Solution: command again. fails second time then likely that device either locked will need replaced. (Part unlocked protected power-up with V_high). Error Name: Flash_CFI_FAIL Return Value: Description: This error return value indicates that read unsuccessful Solution: Autoselect command this fails likely that device faulty interface flash correct. Error Name: Flash_LOCKED Return Value: Description: This error return value indicates that flash block selected already locked. This error method informing user that command effect. Solution: block already locked. right block selected Error Name: Flash_LOCK_FAIL Return Value: Description: This error return value indicates that flash lock command selected block failed. Solution: Autoselect command this fails likely that device faulty interface flash correct.
30/31
AN1203 APPLICATION NOTE
have questions suggestion concerning matters raised this document please send them following electronic mail address:
ask.memory@st.com
(for general enquiries)
Please remember include your name, company, location, telephone number number.
Information furnished believed accurate reliable. However, STMicroelectronics assumes responsibility consequences such information infringement patents other rights third parties which result from use. license granted implication otherwise under patent patent rights STMicroelectronics. Specifications mentioned this publication subject change without notice. This publication supersedes replaces information previously supplied. STMicroelectronics products authorized critical components life support devices systems without express written approval STMicroelectronics. logo registered trademark STMicroelectronics other names property their respective owners 2001 STMicroelectronics Rights Reserved STMicroelectronics GROUP COMPANIES Australia Brazil China Finland France Germany Hong Kong India Italy Japan Malaysia Malta Morocco Singapore Spain Sweden Switzerland United Kingdom U.S.A. www.st.com
31/31

Other recent searches


XN04321 - XN04321   XN04321 Datasheet
X90100 - X90100   X90100 Datasheet
SHM-12 - SHM-12   SHM-12 Datasheet
NSS60200LT1G - NSS60200LT1G   NSS60200LT1G Datasheet
ISL6297 - ISL6297   ISL6297 Datasheet
EN857D - EN857D   EN857D Datasheet
LA7806 - LA7806   LA7806 Datasheet
CT11MPCore - CT11MPCore   CT11MPCore Datasheet
AN1104 - AN1104   AN1104 Datasheet
1772528 - 1772528   1772528 Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive