Home
C90FL Flash Recovery - Freescale Semiconductor
Contents
1. 3 C9OFL flash memory erase operation The C90FL flash memory erase operation consists of multiple steps that are implemented by the C90FL flash memory controller hardware 1 Program All bits in the selected flash memory block s are programmed to a threshold voltage Vt above the program verify level P to allow the erase operation to begin at a consistent state 2 Erase The erase step will erase all bits to a threshold voltage Vt that is below the erase verify level E Since erase is a bulk operation in which an erase pulse will move all the bits in a flash block some of the bits will be over erased in other words below compaction verify or soft program verify level Compaction This step moves any bits that are over erased up to reduce column leakage of the flash array 4 Soft Program At the soft program step all the bits with a threshold voltage Vt below the soft program verify level will be programmed back with very low gate bias to avoid overshoot of erase verify level for any bits As a result when an erase operation is completed all the bits in the selected blocks will have their threshold voltage within a predefined window between erase verify level E and soft program verify level SP o A flow diagram of these steps is shown in the figure below In addition to the flow of the erase operation this figure also includes a graphical representation of the threshold voltage of the flash bits in the cells
2. C90FL OK returnCode ErrorTrap returnCode returnCode pSetLock amp ssdConfig LOCK MID PRIMARY 0 FLASH LMLR PASSWORD if C90FL OK returnCode ErrorTrap returnCode returnCode pSetLock amp ssdConfig LOCK MID SECONDARY 0 FLASH SLMLR PASSWORD if C90FL OK returnCode ErrorTrap returnCode returnCode pSetLock amp ssdConfig LOCK HIGH 0 FLASH HLR PASSWORD if C90FL OK returnCode ErrorTrap returnCode shadowFlag FALSE Select the all main array blocks lowEnabledBlocks Oxffffffff midEnabledBlocks Oxffffffff highEnabledBlocks Oxffffffff returnCode pFlashDepletionRecover amp ssdConfig shadowFlag lowEnabledBlocks midEnabledBlocks highEnabledBlocks NULL CALLBACK if C90FL OK returnCode ErrorTrap returnCode DEMO FINISHED DEMO PASSED return UINT32 DEMO PASS BORK KR KK ke RR RR RK RR RK ke ke KR RR RRR RR RR RK RR RR RR RR KK KR RR e ke ke ke KKK function implementations scope module local n Error trap function void ErrorTrap UINT32 returnCode VUINT32 failedReason failedReason returnCode while 1 The function pointers for the driver functions are defined in ssd_c90fl h as below typedef UINT32 pFLASHINIT PSSD CONFIG pSSDConfig typedef UINT32 pFLASHDEPLETIONREC
3. Freescale Semiconductor Document Number AN4521 Application Note Rev 1 02 May 2012 MPC56xx C90FL Flash Recovery In Case of Brownout during Flash Erase Operation by Chen He Rich Eguchi and Randy Dees NVM Product Test Engineering NVM Design Engineering Application Engineering Austin Texas Contents 1 Introduction UO iii OUROPERRRIRNTRUNUNISUN The MPC56xx family of devices have internal nonvolatile 2320 1 0c o flash memory that is used for code and data Two types of 3 C90FL flash memory erase operation flash modules have been implemented on the Freescale i MPC56xx devices the C90FL and the C90LC The C90FL 2 eee flash is optimized for large flash memory arrays while the STUN OTA RS C90LC is optimized for smaller flash array configurations 4 Recover from non correctable Flash memory is designed to allow fast programming but E ePi etat anticae e au requires that a full block be erased at a time Once i programmed the flash memory retains its programed state 4 2 Recover from depleted bits 2s nonvolatile while powered off In this technology each cell NES dE MENU in the flash memory array holds the value of one bit either 0 i for programmed or 1 for erased This is a 2 level NOR flash GS Reve SPOLYaa dde d p OR ELE et vdd qus implementation and uses a single voltage threshold to A Example debugger erase script eee determine if a bit is high or low This insures maximum data B Example
4. pFLASHINIT FlashInit C pSETLOCK pSetLock pSETLOCK SetLock C pFLASHDEPLETIONRECOVER pFlashDepletionRecover pFLASHDEPLETIONRECOVER FlashDepletionRecover C SSD CONFIG ssdConfig C90FL REG BASE c90f1 control register base MAIN ARRAY BASE base of main array 0 size of main array SHADOW ROW BASE base of shadow row SHADOW ROW SIZE size of shadow row 0 block number in low address space 0 block number in middle address space 0 block number in high address space 0x10 page size FALSE debug mode selection y UINT32 main void UINT32 returnCode Return code from each SSD function BOOL shadowFlag shadow select flag UINT32 lowEnabledBlocks selected blocks in low space UINT32 midEnabledBlocks selected blocks in middle space UINT32 highEnabledBlocks selected blocks in high space Initialize Part returnCode pFlashInit amp ssdConfig if C90FL OK returnCode ErrorTrap returnCode Unlock all main array blocks MPC56xx C90FL Flash Recovery Rev 1 02 May 2012 6 Freescale Semiconductor Inc returnCode pSetLock amp ssdConfig LOCK LOW PRIMARY 0 FLASH LMLR PASSWORD if C90FL OK returnCode ErrorTrap returnCode returnCode pSetLock amp ssdConfig LOCK LOW SECONDARY 0 FLASH SLMLR PASSWORD if
5. The graphs show the threshold voltage distribution of the flash bits after each operation in the flash cell by number of bits versus the threshold voltage V It shows the relative values of Program verify level P Soft program level SP Erase level E NOTE Erased bits 1 have a low threshold voltage and programmed bits 0 have a high threshold voltage MPC56xx C90FL Flash Recovery Rev 1 02 May 2012 2 Freescale Semiconductor Inc Issue caused by brownout during flash memory erase 5 Program Yes 0 SPE P Erase lt q Yi 0 SPE p Mt Compaction sd Yes 0gpg P M e Soft Program Yes SP E p M Figure 1 C90FL flash erase operation flow 4 Issue caused by brownout during flash memory erase On C90FL flash memory if an accidental power loss supply voltage drop or unexpected reset that is a brownout occurs during a flash memory erase operation the flash memory blocks being erased will most likely be left in an indeterminate state depending on which step was executing when the erase operation was interrupted If the flash memory block is in an indeterminate state then the Error Correction Code for each flash word will not match the contents of the flash word This will be seen as an uncorrectable error if the flash word is read by software Typically to return the flash memory block s being interrupted back to a working state users can simply perform an erase operation on the
6. depletion recovery code oec retention to meet harsh automotive requirements For even more protection against bit flips this technology implements MIU lo Mm Error Correction Coding ECC that is guaranteed to correct single bit errors and will identify any double bit errors within the ECC code word 64 bit data bits plus 8 ECC parity bits Due to ECC it is possible to put the flash memory into a state where the ECC bits are invalid This can occur if an erase operation is interrupted prior to completion 1 There are flash memory types that store more than one bit in each flash cell These multi bit cell architectures require much tighter control of the voltage levels stored into the flash bit cell 2011 2012 F i e reescale Semiconductor Inc Pse L si freescale semiconductor Devices affected If a brownout occurs during an erase operation on the C90FL flash the flash blocks being erased can be left in an indeterminate state invalid ECC values A brownout is defined as an accidental power loss or supply voltage drop or unexpected reset This application note describes how to recover the C90FL flash block s that were left in illegal states by an interrupted erase if such a brownout occurs 2 Devices affected Devices that implement the C90FL flash module are shown in Table 1 Table 1 MPC56xx Devices that use the C90FL flash module MPC564xA MPC564xL MPC564xS MPC5668G MPC5668F MPC567xF MPC5676R
7. OVER PSSD_CONFIG pSSDConfig BOOL shadowFlag UINT32 lowEnabledBlocks UINT32 midEnabledBlocks MPC56xx C90FL Flash Recovery Rev 1 02 May 2012 Freescale Semiconductor Inc 7 UINT32 highEnabledBlocks void CallBack void Jus typedef UINT32 pSETLOCK PSSD CONFIG pSSDConfig UINT8 blkLockIndicator UINT32 blkLockState UINT32 password Appendix C References These documents including each device s reference manual and data sheet should also be referred to when working with the flash modules All are available at www freescale com Table C 1 Reference documents MPCxxxxRM Device reference manual MPCxxxxx Device data sheet User manual MPC56xx C90FL Flash Standard Software Driver for Single Module Flash version 1 0 0 or later User manual MPC5674F 5676R C90FL Flash Standard Software Driver version 1 0 0 or later User manual MPC56xx C90FL EEPROM Emulation Software Driver version 1 0 1 or later AN4365 Qorivva MPC56xx Flash Programming Through Nexus JTAG EB618 Typical Data Retention for Nonvolatile Memory EB619 Typical Endurance for Nonvolatile Memory 1 The user manual is installed in the directory with the flash driver and example code when the software driver is installed MPC56xx C90FL Flash Recovery Rev 1 02 May 2012 8 Freescale Semiconductor Inc How to Reach Us Home Page www freescale com Web Support http www frees
8. blk are inputs corresponding to the Low Mid address space block and high address select registers to select which block s to be erased local amp mcr amp peg amp lblk amp hblk amp mcr amp fdone entry amp lblk amp hblk reset MCR data set ea 0xc3f88000 slong 0 data set ea 0xc3f88000 1ong 0 enable block data set ea 0xc3f88010 1ong amp lblk data set ea 0xc3f88014 Slong amp hblk amp fdone 0 set ERS data set ea 0xc3f88000 1ong 0x4 interlock write data set ea 0x00000000 Slong Oxffffffff set EHV data set ea 0xc3f88000 1ong 0x5 wait for DONE while amp fdone MPC56xx C90FL Flash Recovery Rev 1 02 May 2012 Freescale Semiconductor Inc 5 amp mer data list ea 0xc3 88000 amp fdone amp mcr amp 0x0400 clear EHV data set ea 0xc3f88000 1ong 0x4 amp mer data list ea 0xc3 88000 amp peg amp mcr amp 0x0200 if amp peg print fail else print pass clear ERS data set ea 0xc3f88000 1ong 0 Appendix B Example depletion recovery code This listing is an example of calling the FlashDepletionRecover function from the MPC56xx C90FL flash standard software driver to recover depleted blocks of the flash memory include ssd_types h include ssd_c90f1 h include normaldemo h extern const unsigned int FlashInit C extern const unsigned int FlashDepletionRecover C extern const unsigned int SetLock C Assign function pointers pFLASHINIT pFlashInit
9. cale com support USA Europe or Locations Not Listed Freescale Semiconductor Technical Information Center EL516 2100 East Elliot Road Tempe Arizona 85284 1 800 521 6274 or 1 480 768 2130 www freescale com support Europe Middle East and Africa Freescale Halbleiter Deutschland GmbH Technical Information Center Schatzbogen 7 81829 Muenchen Germany 44 1296 380 456 English 46 8 52200080 English 49 89 92103 559 German 33 1 69 35 48 48 French www freescale com support Japan Freescale Semiconductor Japan Ltd Headquarters ARCO Tower 15F 1 8 1 Shimo Meguro Meguro ku Tokyo 153 0064 Japan 0120 191014 or 81 3 5437 9125 support japan freescale com Asia Pacific Freescale Semiconductor China Ltd Exchange Building 23F No 118 Jianguo Road Chaoyang District Beijing 100022 China 86 10 5879 8000 support asia freescale com Document Number AN4521 Rev 1 02 May 2012 Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductors products There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document Freescale Semiconductor reserves the right to make changes without further notice to any products herein Freescale Semiconductor makes no warranty representation or guarantee regarding the suitability of its produc
10. due to suppressed drain bias In other words there would be insufficient voltage to allow the bit to be programmed Note that the first step in an erase operation is a program step and thus for this case the erase operation to recover the interrupted flash memory block s might fail It will appear to users that the flash memory block s cannot be erased and recovered In this case to recover the depleted flash memory block s users first need to use the binary C array FlashDepletionRecover function provided in the MPC56xx C90FL flash standard software driver to recover the depleted bits in the flash memory block s Then the erase operation must be restarted to recover the block s The FlashDepletionRecover function in the flash driver is called in a similar way as any of the other binary C array flash driver functions Please refer to Example depletion recovery code Appendix B for example code for calling this function to recover depleted blocks For EEPROM emulation applications this case is handled in the MPC56xx C90FL EEPROM emulation software driver provided by Freescale Basically there is brownout handling code in the FSL_InitEeprom function If an erase operation fails to recover the interrupted flash memory block s a call to FlashDepletionRecover function will be made to recover the depleted bits and then an erase operation will be started again to recover the interrupted flash memory block s 2 Check with your flash programming too
11. flash memory block s However there are two cases that require special attention recovering from non correctable ECC errors and recovering from depleted bits 4 1 Recover from non correctable ECC errors A brownout during a flash memory erase operation will very likely leave the bits in the block s being erased in a state such that when the block s are read non correctable ECC error correcting code errors will occur MPC56xx C90FL Flash Recovery Rev 1 02 May 2012 ev Freescale Semiconductor Inc Issue caused by brownout during flash memory erase NOTE In the C90FL flash memory single bit error correction and double bit error detection SEC DED ECC code is used For example if the brownout occurs during the program step in the erase operation many flash memory pages including the corresponding ECC bits will be left programmed Note that all zeros is not a valid ECC codeword and hence this will cause non correctable ECC errors when reading those flash memory block s This can also be seen if the brownout occurs after the program step but in the middle of the erase step Even in this state the flash memory block s can still be erased to recover However many flash programming tools by default may read flash memory while executing the erase code from RAM before performing an erase operation As a result an ECC error will be generated and hence an exception If the flash programming tool does not have a proper excepti
12. ized use even if such claims alleges that Freescale Semiconductor was negligent regarding the design or manufacture of the part RoHS compliant and or Pb free versions of Freescale products have the functionality and electrical characteristics as their non RoHS complaint and or non Pb free counterparts For further information see http www freescale com or contact your Freescale sales representative For information on Freescale s Environmental Products program go to http www freescale com epp Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners 2011 2012 Freescale Semiconductor Inc freescale semiconductor
13. l provider for instructions to disable reads prior to an erase MPC56xx C90FL Flash Recovery Rev 1 02 May 2012 4 Freescale Semiconductor Inc p Conclusion 5 Conclusion Typically if an erase operation is interrupted due to a brownout simply repeating the flash erase operation will recover the the flash memory block s However special care needs to be considered for cases in which an erase operation does not remove ECC errors and depleted bits A generic erase should always be used initially If the generic erase fails the new FlashDepletionRecover function should be used to to fix non correctable ECC errors and bits left in a depleted state 6 Revision history Table 2 Revision history 1 02 May 2012 Substantially expanded information throughout document and added images Revision 0 not publicly released Appendix A Example debugger erase script Here is an example script erase_blk cmm that will restore a C9OFL flash to a standard erased state This is essentially the same as the FlashErase function of the MPC56xx C90FL flash standard software driver This example is written for the MPC564xL using the Lauterbach Trace32 debugger The script is called with the values of the Low Mid Address Select register value and the high address select register value in the following manner to erase the Low Address Space block 0 LASO do erase blk cmm 1 0 Here is a listing of the erase blk cmm script file lblk and h
14. on handler implemented the exception may cause code execution to hang This will cause the erase operation to fail The tool may include an option to not perform a read of a block prior to the erase operation See Example debugger erase script Appendix A for a sample debugger script that performs an erase operation without first performing a read of the flash memory To recover from such a state users need to be aware of possible flash programmer tool failure for an erase operation caused by a flash ECC exception Users can either use the FlashErase function provided in the MPC56xx C90FL flash standard software driver to erase the interrupted flash memory block s or use a Nexus JTAG debugger script to simply toggle the low level flash register bits to perform the erase operation Please refer to Example debugger erase script Appendix A for a sample Lauterbach Trace32 script for erasing C90FL flash 4 2 Recover from depleted bits It is also possible that a brownout during the flash erase operation will leave the bits in the flash memory block s being erased in an over erased or depleted state For instance if the brownout occurs after the erase step but prior to the compaction and soft program steps are completed it is possible that the flash bits will be left in a depleted state very low threshold voltage Depending on how depleted the bits are excessive column leakage caused by the bits may cause the following program operation to fail
15. ts for any particular purpose nor does Freescale Semiconductor assume any liability arising out of the application or use of any product or circuit and specifically disclaims any liability including without limitation consequential or incidental damages Typical parameters that may be provided in Freescale Semiconductor data sheets and or specifications can and do vary in different applications and actual performance may vary over time All operating parameters including Typicals must be validated for each customer application by customer s technical experts Freescale Semiconductor does not convey any license under its patent rights nor the rights of others Freescale Semiconductor products are not designed intended or authorized for use as components in systems intended for surgical implant into the body or other applications intended to support or sustain life or for any other application in which failure of the Freescale Semiconductor product could create a situation where personal injury or death may occur Should Buyer purchase or use Freescale Semiconductor products for any such unintended or unauthorized application Buyer shall indemnify Freescale Semiconductor and its officers employees subsidiaries affiliates and distributors harmless against all claims costs damages and expenses and reasonable attorney fees arising out of directly or indirectly any claim of personal injury or death associated with such unintended or unauthor
Download Pdf Manuals
Related Search
Related Contents
User Guide HuProt™ Human Proteome Microarray v2.0 User Panasonic Air Conditioner LG LTM9000ST User's Manual Canon Unit-AE1 to IKG205, IKG275, IKG405, IKG505 User Manual. Sistema DBO OxiDirect® 取扱説明書 - サニーテクノ Copyright © All rights reserved.
Failed to retrieve file