APPLICATION NOTE Design notice - Serial Flash Erase Suspend/Resume & Program Suspend/Resume Flow 1. Introduction Macronix serial flash offers Erase Suspend/Resume and Program Suspend/Resume functions that are very similar to those provided by parallel flash. They allow system access to flash during Erase/Program operations by pausing the Erase/Program process. There are timing and usage restrictions specified in the datasheet that must be observed to ensure successful completion of the Erase/Program process. This application note explains how to use the Suspend/Resume flow in the design and highlights some of the restrictions found in the datasheet. The information in this document is based on datasheets listed in Section 6. Newer versions of the datasheets may override the contents of this document. 2. Erase Suspend/Resume Flow An active erase procedure may be temporarily paused to facilitate a flash Read or Program operation. The following subsections will describe “Suspend to Read” and “Suspend to Program” operations separately. 2-1. Suspend to Read After receiving a Suspend command, the device takes 20us (max.) to enter Erase-Suspended mode. While in this mode, the core chip can read data from any sector or block not associated with the suspended erase operation. If a Block Erase is suspended, then no sector within that block may be read. If a Sector Erase is suspended, then only that sector may not be read and all other sectors are available (including other sectors within the same block). After receiving a Resume command, the Erase operation will continue until finished or a new Suspend command is received. A new Suspend command should not be used until after Tresume time, which is the minimum time required to restart the erase operation. In the datasheet, Tresume is referred to as ‘Resume to Suspend Latency’ and is typically 1ms, but please refer to the current datasheet for the exact value. 2-2. Suspend to Program The MX25U1635E/MX25U3235E/6435E serial flash devices support the Program function during Erase-Suspended mode. After receiving a Suspend command, the device takes 20us (max.) to enter Erase-Suspended mode. While in this mode, the core chip can write data into flash. However, there are areas that are excluded from programming. Sectors and blocks are grouped into 512KB banks (Refer to Figure 2-1). Programming may not be done in the same 512KB bank where an Erase operation has been suspended. All other banks are open and may be programmed. After receiving a Resume command, the Erase operation will continue until finished or a new Suspend command is received. A new Suspend command should not be used until after Tresume time, which is the minimum time required to restart the erase operation. In the datasheet, Tresume is referred to as ‘Resume to Suspend Latency’ and is typically 1ms, but please refer to the current datasheet for the exact value. P/N:AN0202 1 Ver:01, Nov. 29, 2012 APPLICATION NOTE Design notice - Serial Flash Erase Suspend/Resume & Program Suspend/Resume Flow Figure 2-1: Erase Suspend to Program Bank Mapping for Different Flash Densities P/N:AN0202 MX25U6435E (64Mb) Bank (512KB) Address range 15 780000h – 7FFFFFh ˙ ˙ ˙ ˙ 7 380000h – 3FFFFFh ˙ ˙ ˙ ˙ 4 3 2 1 0 200000h – 27FFFFh 180000h – 1FFFFFh 100000h – 17FFFFh 080000h – 0FFFFFh 000000h – 07FFFFh 2 MX25U3235E (32Mb) MX25U1635E (16Mb) Ver:01, Nov. 29, 2012 APPLICATION NOTE Design notice - Serial Flash Erase Suspend/Resume & Program Suspend/Resume Flow Figure 2-2: Erase Suspend/Resume Flow Start * Assumes device is idle and no error conditions exist WREN command RDSR command WEL = 1? No * Check bit-1 of Status Register Yes Erase command RDSR command Erase suspend require? No Yes WIP = 0? No Yes Tresume Timer = 0? No * Enforces required delay from Resume to next Suspend Erase Finish Yes Set Tresume Timer = 0 * ERS Suspend opcode:B0h/75h MX25L6439E: 75h All others: B0h ERS Suspend command Wait 20us End RDSCUR command No ESB = 1? * Check bit3 of Security Register to confirm WSM enter Erase Suspend mode * MX25U1635E/3235E/6435E support Suspend to PGM & Read Others support Suspend to Read * PGM area: outside 512KB * Read area: outside suspend sector/ block Yes PGM/Read data in non-erased area * ERS Resume opcode:30h/7Ah MX25L6439E: 7Ah All others: 30h ERS Resume command RDSCUR command No ESB = 0? Yes Set Tresume Timer =min time (Typ. 1ms) P/N:AN0202 3 * Check bit3 of Security Register to confirm WSM return Erase mode * Initialize Tresume timer to enforce required minimum delay from Erase Resume to next Erase Suspend Ver:01, Nov. 29, 2012 APPLICATION NOTE Design notice - Serial Flash Erase Suspend/Resume & Program Suspend/Resume Flow 3. Program Suspend/Resume Flow After receiving a Suspend command while programming is active, the device takes 20us (max.) to enter Program-Suspended mode. While in the Program-Suspended mode, the core chip can read data from any location outside of the sector which contains the suspended program page. After receiving a Resume command, the Page Program operation will continue until finished or a new Suspend command is received. A new Suspend command should not be used until after Tresume time, which is the minimum time required to restart the page program operation. In the datasheet, Tresume is referred to as ‘Resume to Suspend Latency’ and is typically 1ms, but please refer to the current datasheet for the exact value. P/N:AN0202 4 Ver:01, Nov. 29, 2012 APPLICATION NOTE Design notice - Serial Flash Erase Suspend/Resume & Program Suspend/Resume Flow Figure 3-1: Program Suspend/Resume Flow Start * Assumes device is idle and no error conditions exist WREN command RDSR command WEL = 1? No * Check bit-1 of Status Register Yes Program command RDSR command Program suspend require? No Yes WIP = 0? No Yes Tresume Timer = 0? No * Enforces required delay from Resume to next Suspend Program Finish Yes Set Tresume Timer = 0 * PGM Suspend opcode:B0h/75h MX25L6439E: 75h All others: B0h PGM Suspend command Wait 20us End RDSCUR command No PSB = 1? * Check bit2 of Security Register to confirm WSM enter Program Suspend mode Yes * Data may only be read from sectors that do not encompass the suspended program page Read data outside sector encompassing suspend page area * PGM Resume opcode:30h/7Ah MX25L6439E: 7Ah All others: 30h PGM Resume command RDSCUR command No PSB = 0? Yes Set Tresume Timer =min time (Typ. 1ms) P/N:AN0202 5 * Check bit2 of Security Register to confirm WSM return Program mode * Initialize Tresume timer to enforce required minimum delay from Program Resume to next Program Suspend Ver:01, Nov. 29, 2012 APPLICATION NOTE Design notice - Serial Flash Erase Suspend/Resume & Program Suspend/Resume Flow 4. Summary Newer Macronix serial flash designs support “Erase Suspend/Resume” and “Program Suspend/Resume” functions. It is important to follow the datasheet timing with respect to the Suspend/Resume flows to ensure Program and Erase processes complete efficiently. Violating the Resume to Suspend Latency recommendation in the datasheet may cause Program or Erase times to exceed their maximum specified times or fail to finish. 5. Device Support List Table 5-1 shows Macronix serial flash devices that support the Suspend/Resume function, and is ordered by density. Only the devices noted with ‘Support ERS suspend to PGM function’ allow programming during the Erase-Suspended mode. Table 5-1: Devices Supporting Erase and Program Suspend/Resume Density Voltage Device Note 8Mb 16Mb 32Mb 1.8V 1.8V 3V 1.8V 3V 64Mb 128Mb 1.8V 3V 1.8V P/N:AN0202 256Mb 3V 512Mb 3V MX25U8035E MX25U1635E MX25L3239E MX25U3235E MX25U3235F MX25L6439E MX25U6435E MX25U6435F MX25L12835F MX25L12875F MX25U12835F MX25L25635F MX25L25639F MX25L25735F MX66L51235F Support ERS suspend to PGM function Support ERS suspend to PGM function Support ERS suspend to PGM function 6 Ver:01, Nov. 29, 2012 APPLICATION NOTE Design notice - Serial Flash Erase Suspend/Resume & Program Suspend/Resume Flow 6. References Table 6-1 shows the datasheet versions used for comparison in this application note. For the most current specification, please refer to the Macronix Website at http://www.macronix.com Table 6-1: Datasheet Version Table Data sheet Location MX25U8035E MX25U1635E MX25L3239E MX25U3235E MX25U3235F MX25L6439E MX25U6435E MX25U6435F MX25L12835F MX25L12875F MX25U12835F MX25L25635F MX25L25639F MX25L25735F MX66L51235F Website Website Website Website Website Website Website Website Website Website Website Website Website Website Website Date Issued Revision FEB. 10, 2012 FEB. 10, 2012 JUN. 22, 2012 FEB. 10, 2012 FEB. 03, 2012 JUN. 22, 2012 FEB. 10, 2012 FEB. 03, 2012 APR. 17, 2012 JUL. 11, 2012 AUG. 31, 2012 AUG. 07, 2012 APR. 25, 2012 JUL. 18, 2012 AUG. 08, 2012 Rev. 1.2 Rev. 1.5 Rev. 0.00 Rev. 1.5 Rev. 1.0 Rev. 0.00 Rev. 1.3 Rev. 1.0 Rev. 0.01 Rev. 0.00 Rev. 1.1 Rev. 0.02 Rev. 0.00 Rev. 0.00 Rev. 0.00 7. Revision Table 7-1: Revision history Revision Description Date Issued Rev. 1.0 Initial Release OCT. 24, 2012 P/N:AN0202 7 Ver:01, Nov. 29, 2012 APPLICATION NOTE Design notice - Serial Flash Erase Suspend/Resume & Program Suspend/Resume Flow Except for customized products which have been expressly identified in the applicable agreement, Macronix's products are designed, developed, and/or manufactured for ordinary business, industrial, personal, and/or household applications only, and not for use in any applications which may, directly or indirectly, cause death, personal injury, or severe property damages. In the event Macronix products are used in contradicted to their target usage above, the buyer shall take any and all actions to ensure said Macronix's product qualified for its actual use in accordance with the applicable laws and regulations; and Macronix as well as it’s suppliers and/or distributors shall be released from any and all liability arisen therefrom. Copyright© Macronix International Co., Ltd. 2011~2012. All rights reserved, including the trademarks and tradename thereof, such as Macronix, MXIC, MXIC Logo, MX Logo, Integrated Solutions Provider, NBit, Nbit, NBiit, Macronix NBit, eLiteFlash, HybridNVM, HybridFlash, XtraROM, Phines, KH Logo, BE-SONOS, KSMC, Kingtech, MXSMIO, Macronix vEE, Macronix MAP, Rich Au-dio, Rich Book, Rich TV, and FitCAM. The names and brands of third party referred thereto (if any) are for identification purposes only For the contact and order information, please visit Macronix’s Web site at: http://www.macronix.com P/N:AN0202 8 Ver:01, Nov. 29, 2012