Comparing Low Density SPI EEPROM with Macronix Serial NOR Flash 1. Introduction This application note serves as a guide to compare low density SPI EEPROM with Macronix 512Kb low density Serial NOR Flash. The application note does not apply to I2C EEPROMs. Due to architecture differences, EEPROM and Flash memory require different sequences to program data into their memory array. EEPROM Write and Erase operations are performed on a byte-per-byte basis with only one command. When using flash memory however, the system must use two different commands to complete program operations. Flash memory requires a sector erase, block erase or chip erase to be completed before programming data into the memory array. In this application note, the Macronix Serial NOR Flash and Microchip SPI EEPROM are used for comparison. The document does not provide detailed information on each individual device, but highlights the similarities and differences between them. The comparison covers the general features, performance, command codes, and other differences. Newer versions of the datasheets may override the contents of this document. 2. Features Macronix Serial NOR Flash and SPI EEPROM have similar features and functions as shown in Table 2-1. Significant differences are highlighted in blue and may require special considerations. Table 2-1: Feature Comparison Type / Function Macronix Serial NOR Flash Microchip SPI EEPROM Supply Voltage Range 2.35V-3.6V 1.8V-5.5V Fast Read (1-1-1) 1 - Dual Output (1-1-2) 1 - Normal Read Clock Frequency 33MHz 5~20MHz 2 Fast Read Clock Frequency (x1) 75MHz - Sector Size 4KB - Program Buffer Size 256Byte 64Byte HOLD# Pin Block Protection Mode Endurance (Program/Erase Cycles) 3 100K 1M Data Retention (min.) 20Yr 100Yr 8-USON (2x3mm) - Packages 8-TSSOP (173mil) 8-SOP (150mil) 8-VFBGA - Notes: 1. x-y-z in I/O mode indicates the number of active pins used for op-code(x), address(y) and data(z). 2. 5MHz at VCC = 1.8V-5.5V to 20MHz with restricted voltage range = 4.5V-5.5V. 3. Microchip endurance characterized at 3.3V, 25C, Page Mode. Macronix endurance per 4KB sector. Publication Number: AN- 0254 1
3. Key Feature and Operational Differences This section will describe some of the key features and operational differences in depth. 3-1. Programming SPI EEPROMs do not require an erase before a write data operation. However, the Macronix Serial NOR Flash does require an erase before program data operation. This will require firmware modification as even a single byte write to Serial NOR Flash will require at least a 4KB sector to be erased first, followed by a re-write of the entire sector. A read-modify-write scheme may need to be utilized where the sector is first read to an external buffer where data is modified, the sector is erased, and the modified data is rewritten to the flash. SPI EEPROM receives command 02h for a programming operation directly after a 06h Write Enable command is issued. The must utilize an Erase command such as Sector Erase(20h), Block Erase(52h/D8h), or Chip Erase(60h/C7h) before a Page Programming command (02h). The Sector Erase command (20h) erases 4K bytes. After the sector erase operation is done, all of the data within the erased sector are FFh. The system can then issue the Program command (02h) to program one or more bytes (maximum is one page or 256 bytes) anywhere in the sector. Additional bytes may be programmed later to unused locations in the same sector without another erase operation. Because the flash memory array is comprised of one 64KB block (subdivided into sixteen 4KB sectors) the Block Erase and Chip Erase commands (60h/C7h) can be used interchangeably, as they both erase the entire chip (64KB = 512Kb). A Block Erase performs the same function as Sector Erase, but the erased area is increased from 4K bytes to 64K bytes. After the block erase operation (52h/D8h) is done, all data within the erased block/chip are FFh. Again, the system can then issue a Program command (02h) to program one or more bytes (maximum is one page or 256 bytes) anywhere in the block/chip. Additional bytes may be programmed later to unused locations in the same block/chip without another erase operation. The Serial NOR Flash Erase and Program Flow is shown in Figure 3-1. 3-2. ID command Some SPI EEPROM devices do not support the read identification command. supports the Read ID command (9Fh) and returns the Macronix Manufacturer ID of C2h and Memory Type ID 20h. Table 3-1: Manufacturer and Device ID Comparison ID Type Macronix Serial NOR Flash Microchip SPI EEPROM Manufacture ID C2h N/A Memory Type 20h N/A Device ID Memory Density 10h N/A Publication Number: AN- 0254 2
Figure 3-1: Serial NOR Flash Erase and Program Flow Start * Assumes device is idle and no error conditions exist WREN command RDSR command WEL = 1? No * Check Status Register bit-1 Program command+addr+data or Erase command+addr * No Addr required for Chip Erase RDSR command WIP and WEL = 0? Read Array Data (same addr of PGM/ERS) No * Check Status Reg. bits 1 and 2 Verify OK? No Program/Erase successful Program/Erase fail Program/Erase another block? Program/Erase completed End Publication Number: AN- 0254 3
4. Package and Pinout Comparison Both device types are available in 150mil 8-SOP and 173mil 8-TSSOP packages with similar footprints and pinouts as shown in Table 4-1. Table 4-1: Package Pin Comparison 8-SOP and 8-TSSOP CS# CS# 1 8 VCC VCC SO/SIO1 SO 2 7 HOLD# HOLD# WP# WP# 3 6 SCK SCLK GND GND 4 5 SI SI/SIO0 Publication Number: AN- 0254 4
5. Performance Tables 5-1 and Table 5-2 show AC and DC information for the two devices. Table 5-1: AC Parameter Comparison Symbol Parameter Macronix Microchip Condition Macronix Microchip Supply Voltage Range - - - 2.35V -3.6 V 1.8V 5.5V Normal Read Frequency - - - 25MHz 5~20MHz Fast Read Frequency - - 1 I/O 75MHz - Clock High/Low Time tch/tcl twh/twl min 6~13ns 20~80ns Clock Low to Output Valid tclqv tv max@10pf 6ns 20~80ns Data In Setup Time tdvch tsu min 2ns 5~20ns Data In Hold Time tchdx th min 5ns 5~30ns Page Program Time tpp twc typ 0.7ms - max 1ms 5ms Sector Erase (4KB) Time tse - typ 60ms - max 300ms - Block Erase (64KB) Time and Chip Erase Time tbe / tce - typ 0.5s - max 1s - Parameter Table 5-2: DC Parameter Comparison Symbol Condition Macronix Microchip Macronix Microchip Leakage Current ILI/ILO IIL/IOL max. +/- 2uA +/-3 ua Standby Current ISB1 ISB3 max 25uA 5uA Deep Power Down Current ISB2 - typ 5uA - max 10uA - max @ 20MHz - 10mA VCC Read Current ICC1 ICC1 max @ 33MHz 4mA - max @ 66MHz 10mA - VCC Program Current ICC2 ICC2 max 20mA 7mA VCC Write Status Register Current ICC3 - max 15mA - VCC Sector Erase Current ICC4 - max 15mA - VCC Chip Erase Current ICC5 - max 20mA - Publication Number: AN- 0254 5
6. Command Code Table 6-1: Command Code Comparison Command Symbol Description Macronix Microchip RDID Read Identification 9Fh - RES Read Electronic ID ABh - ID Read Read Electronic Manufacturer REMS 90h - & Device ID READ Read Data 03h 03h Read FAST READ Fast Read (1-1-1) 0Bh - READ SFDP Read SFDP ( only) 5Ah - SE Sector Erase (4KB) 20h - Erase BE (64K) Block Erase (64KB) 52h/D8h - CE Chip Erase 60h/C7h - Program PP Page Program 02h 02h WREN Write Enable 06h 06h Mode Register WRDI Write Disable 04h 04h DP Deep Power Down B9h - RDP Release from Deep Power Down ABh - WRSR Write Status Register 01h 01h RDSR Read Status Register 05h 05h 7. Summary Macronix Serial NOR Flash and Microchip SPI EEPROM have similar commands, functions, features, supported package types and pinout definitions. The primary difference that needs to be accommodated is that SPI EEPROM does not require an erase before a write data operation while flash does. This will require firmware modification as even a single byte write to Serial NOR Flash will require at least a 4KB sector to be erased first, followed by a re-write of the entire sector. A read-modify-write scheme may need to be utilized where the sector is 1 st read to an external buffer where data is modified, the sector is erased, and the modified data is rewritten to the flash. 8. References Table 8-1 shows the datasheet versions used for comparison in this application note. For the most current, detailed Macronix specification, please refer to the Macronix Website at http://www.macronix.com Table 8-1: Datasheet Version Datasheet Location Date Issued Version Macronix Website May 2013 1.1 Microchip Website Aug. 2011 8698C 9. Revision History Revision Date Description 01 July 1, 2013 Initial Release 2 January 22, 2018 1. Updated the numbering format to align with the new internal rule. 2. Title and copyright description modification, added "Macronix Proprietary". Publication Number: AN- 0254 6
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. 2013-2018. All rights reserved, including the trademarks and tradename thereof, such as Macronix, MXIC, MXIC Logo, MX Logo, Integrated Solutions Provider, Nbit, Macronix NBit, HybridNVM, HybridFlash, HybridXFlash, XtraROM, KH Logo, BE-SONOS, KSMC, Kingtech, MXSMIO, Macronix vee, Macronix MAP, RichBook, Rich TV, OctaRAM, OctaBus, OctaFlash, 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 Publication Number: AN- 0254 7