0
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心
发布
  • 发文章

  • 发资料

  • 发帖

  • 提问

  • 发视频

创作活动
N25Q128A23E12H0G

N25Q128A23E12H0G

  • 厂商:

    NUMONYX

  • 封装:

  • 描述:

    N25Q128A23E12H0G - 128-Mbit 3 V, multiple I/O, 4-Kbyte subsector erase on boot sectors,XiP enabled, ...

  • 数据手册
  • 价格&库存
N25Q128A23E12H0G 数据手册
N25Q128 128-Mbit 3 V, multiple I/O, 4-Kbyte subsector erase on boot sectors, XiP enabled, serial flash memory with 108 MHz SPI bus interface Features SPI-compatible serial bus interface 108 MHz (maximum) clock frequency 2.7 V to 3.6 V single supply voltage Supports legacy SPI protocol and new Quad I/O or Dual I/O SPI protocol Quad/Dual I/O instructions resulting in an equivalent clock frequency up to 432 MHz: XIP mode for all three protocols – Configurable via volatile or non-volatile registers (enabling the memory to work in XiP mode directly after power on) Program/Erase suspend instructions Continuous read of entire memory via single instruction: – Fast Read – Quad or Dual Output Fast Read – Quad or Dual I/O Fast Read Flexible to fit application: – Configurable number of dummy cycles – Output buffer configurable – Fast POR instruction to speed up power on phase – Reset function available upon customer request 64-byte user-lockable, one-time programmable (OTP) area Erase capability – Subsector (4-Kbyte) granularity in the 8 boot sectors (bottom or top parts). – Sector (64-Kbyte) granularity Write protections – Software write protection applicable to every 64-Kbyte sector (volatile lock bit) – Hardware write protection: protected area size defined by five non-volatile bits (BP0, BP1, BP2, BP3 and TB bit) VDFPN8 (F8) 8 × 6 mm (MLP8) SO16 (SF) 300 mils width TBGA24 (12) 6 x 8 mm – Additional smart protections available upon customer request Electronic signature – JEDEC standard two-byte signature (BA18h) – Additional 2 Extended Device ID (EDID) bytes to identify device factory options – Unique ID code (UID) with 14 bytes readonly, available upon customer request More than 100,000 program/erase cycles per sector More than 20 years data retention Packages – RoHS compliant February 2010 Rev 1.0 1/180 www.numonyx.com 1 Contents M25Q128 - 3 V Contents 1 2 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Signal descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 Serial data output (DQ1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Serial data input (DQ0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Serial Clock (C) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Chip Select (S) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Hold (HOLD) or Reset (Reset) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Write protect/enhanced program supply voltage (W/VPP), DQ2 . . . . . . . 18 VCC supply voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 VSS ground . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3 4 SPI Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 SPI Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.1 4.2 4.3 Extended SPI protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Dual I/O SPI (DIO-SPI) protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Quad SPI (QIO-SPI) protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 5 Operating features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5.1 Extended SPI Protocol Operating features . . . . . . . . . . . . . . . . . . . . . . . 23 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.1.10 Read Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Page programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Dual input fast program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Dual Input Extended Fast Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Quad Input Fast Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Quad Input Extended Fast Program . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Subsector erase, sector erase and bulk erase . . . . . . . . . . . . . . . . . . . 24 Polling during a write, program or erase cycle . . . . . . . . . . . . . . . . . . . . 24 Active power and standby power modes . . . . . . . . . . . . . . . . . . . . . . . . 25 Hold (or Reset) condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.2 Dual SPI (DIO-SPI) Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.2.1 Multiple Read Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2/180 M25Q128 - 3 V 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 5.2.8 Contents Dual Command Fast reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Page programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Subsector Erase, Sector Erase and Bulk Erase . . . . . . . . . . . . . . . . . . 28 Polling during a Write, Program or Erase cycle . . . . . . . . . . . . . . . . . . . 28 Read and Modify registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Active Power and Standby Power modes . . . . . . . . . . . . . . . . . . . . . . . 28 HOLD (or Reset) condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5.3 Quad SPI (QIO-SPI)Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.3.7 5.3.8 5.3.9 Multiple Read Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Quad Command Fast reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 QUAD Command Page programming . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Subsector Erase, Sector Erase and Bulk Erase . . . . . . . . . . . . . . . . . . 30 Polling during a Write, Program or Erase cycle . . . . . . . . . . . . . . . . . . . 30 Read and Modify registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Active Power and Standby Power modes . . . . . . . . . . . . . . . . . . . . . . . 31 HOLD (or Reset) condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 VPP pin Enhanced Supply Voltage feature . . . . . . . . . . . . . . . . . . . . . . 31 6 Volatile and Non Volatile Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 6.1 Legacy SPI Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 6.1.1 6.1.2 6.1.3 6.1.4 6.1.5 WIP bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 WEL bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 BP3, BP2, BP1, BP0 bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 TB bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 SRWD bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6.2 Non Volatile Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6.2.1 6.2.2 6.2.3 6.2.4 6.2.5 6.2.6 6.2.7 Dummy clock cycle NV configuration bits (NVCR bits from 15 to 12) . . 37 XIP NV configuration bits (NVCR bits from 11 to 9) . . . . . . . . . . . . . . . . 38 Output Driver Strength NV configuration bits (NVCR bits from 8 to 6) . . 38 Fast POR NV configuration bit (NVCR bit 5) . . . . . . . . . . . . . . . . . . . . . 38 Hold (Reset) disable NV configuration bit (NVCR bit 4) . . . . . . . . . . . . 38 Quad Input NV configuration bit (NVCR bit 3) . . . . . . . . . . . . . . . . . . . . 38 Dual Input NV configuration bit (NVCR bit 2) . . . . . . . . . . . . . . . . . . . . . 39 6.3 Volatile Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.3.1 6.3.2 Dummy clock cycle: VCR bits 7 to 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 XIP Volatile Configuration bits (VCR bit 3) . . . . . . . . . . . . . . . . . . . . . . . 41 6.4 Volatile Enhanced Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . 41 3/180 Contents 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 M25Q128 - 3 V Quad Input Command VECR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Dual Input Command VECR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Reset/Hold disable VECR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Accelerator pin enable: QIO-SPI protocol / QIFP/QIEFP VECR . . . 43 Output Driver Strength VECR . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 6.5 Flag Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 6.5.1 6.5.2 6.5.3 6.5.4 6.5.5 6.5.6 6.5.7 P/E Controller Status bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Erase Suspend Status bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Erase Status bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Program Status bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 VPP Status bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Program Suspend Status bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Protection Status bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 7 Protection modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 7.1 7.2 SPI Protocol-related protections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Specific hardware and software protection . . . . . . . . . . . . . . . . . . . . . . . . 48 8 9 Memory organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 9.1 Extended SPI Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 9.1.1 9.1.2 9.1.3 9.1.4 9.1.5 9.1.6 9.1.7 9.1.8 9.1.9 9.1.10 9.1.11 9.1.12 9.1.13 9.1.14 9.1.15 Read Identification (RDID) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Read Data Bytes (READ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Read Data Bytes at Higher Speed (FAST_READ) . . . . . . . . . . . . . . . . 81 Dual Output Fast Read (DOFR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Dual I/O Fast Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Quad Output Fast Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Quad I/O Fast Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Read OTP (ROTP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Write Enable (WREN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Write Disable (WRDI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Page Program (PP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Dual Input Fast Program (DIFP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Dual Input Extended Fast Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Quad Input Fast Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Quad Input Extended Fast Program . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 4/180 M25Q128 - 3 V 9.1.16 9.1.17 9.1.18 9.1.19 9.1.20 9.1.21 9.1.22 9.1.23 9.1.24 9.1.25 9.1.26 9.1.27 9.1.28 9.1.29 9.1.30 9.1.31 9.1.32 9.1.33 Contents Program OTP instruction (POTP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Subsector Erase (SSE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Sector Erase (SE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Bulk Erase (BE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Program/Erase Suspend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Program/Erase Resume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Read Status Register (RDSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Write status register (WRSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Read Lock Register (RDLR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 Write to Lock Register (WRLR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Read Flag Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 Clear Flag Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 Read NV Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Write NV Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Read Volatile Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Write Volatile Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Read Volatile Enhanced Configuration Register . . . . . . . . . . . . . . . . . 110 Write Volatile Enhanced Configuration Register . . . . . . . . . . . . . . . . . 110 9.2 DIO-SPI Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 9.2.1 9.2.2 9.2.3 9.2.4 9.2.5 9.2.6 9.2.7 9.2.8 9.2.9 9.2.10 9.2.11 9.2.12 9.2.13 9.2.14 9.2.15 9.2.16 9.2.17 9.2.18 Multiple I/O Read Identification protocol . . . . . . . . . . . . . . . . . . . . . . . 113 Dual Command Fast Read (DCFR) . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Read OTP (ROTP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Write Enable (WREN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Write Disable (WRDI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Dual Command Page Program (DCPP) . . . . . . . . . . . . . . . . . . . . . . . 116 Program OTP instruction (POTP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Subsector Erase (SSE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Sector Erase (SE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Bulk Erase (BE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Program/Erase Suspend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Program/Erase Resume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Read Status Register (RDSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Write status register (WRSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Read Lock Register (RDLR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Write to Lock Register (WRLR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Read Flag Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Clear Flag Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 5/180 Contents 9.2.19 9.2.20 9.2.21 9.2.22 9.2.23 9.2.24 M25Q128 - 3 V Read NV Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 Write NV Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Read Volatile Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Write Volatile Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Read Volatile Enhanced Configuration Register . . . . . . . . . . . . . . . . . 128 Write Volatile Enhanced Configuration Register . . . . . . . . . . . . . . . . . 128 9.3 QIO-SPI Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 9.3.1 9.3.2 9.3.3 9.3.4 9.3.5 9.3.6 9.3.7 9.3.8 9.3.9 9.3.10 9.3.11 9.3.12 9.3.13 9.3.14 9.3.15 9.3.16 9.3.17 9.3.18 9.3.19 9.3.20 9.3.21 9.3.22 9.3.23 9.3.24 Multiple I/O Read Identification (MIORDID) . . . . . . . . . . . . . . . . . . . . . 131 Quad Command Fast Read (QCFR) . . . . . . . . . . . . . . . . . . . . . . . . . . 132 Read OTP (ROTP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 Write Enable (WREN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Write Disable (WRDI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Quad Command Page Program (QCPP) . . . . . . . . . . . . . . . . . . . . . . . 136 Program OTP instruction (POTP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 Subsector Erase (SSE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Sector Erase (SE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Bulk Erase (BE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 Program/Erase Suspend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 Program/Erase Resume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 Read Status Register (RDSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Write status register (WRSR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Read Lock Register (RDLR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 Write to Lock Register (WRLR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 Read Flag Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Clear Flag Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 Read NV Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Write NV Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 Read Volatile Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Write Volatile Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . 152 Read Volatile Enhanced Configuration Register . . . . . . . . . . . . . . . . . 153 Write Volatile Enhanced Configuration Register . . . . . . . . . . . . . . . . . 154 10 XIP Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 10.1 10.2 10.3 10.4 Enter XIP mode by setting the Non Volatile Configuration Register . . . . 157 Enter XIP mode by setting the Volatile Configuration Register . . . . . . . 159 XIP mode hold and exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 XIP Memory reset after a controller reset . . . . . . . . . . . . . . . . . . . . . . . . 161 6/180 M25Q128 - 3 V Contents 11 Power-up and power-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 11.1 11.2 Fast POR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 Rescue sequence in case of power loss during WRNVCR . . . . . . . . . . 164 12 13 14 15 16 17 Initial delivery state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Maximum rating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 DC and AC parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 Package mechanical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 7/180 List of tables M25Q128 - 3 V List of tables Table 1. Table 2. Table 3. Table 4. Table 5. Table 6. Table 7. Table 8. Table 9. Table 10. Table 11. Table 12. Table 13. Table 14. Table 15. Table 16. Table 17. Table 18. Table 19. Table 20. Table 21. Table 22. Table 23. Table 24. Table 25. Table 26. Table 27. Table 28. Table 29. Table 30. Table 31. Table 32. Table 33. Table 34. Table 35. Table 36. Table 37. Table 38. Table 39. Signal names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Status register format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Non-Volatile Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Maximum allowed frequency (MHz). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Volatile Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Volatile Enhanced Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Flag Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Software protection truth table (Sectors 0 to 255, 64 Kbyte granularity) . . . . . . . . . . . . . . 49 Protected area sizes (TB bit = 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Protected area sizes (TB bit = 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Memory organization (uniform) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Memory organization (bottom) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Memory organization (top) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Instruction set: extended SPI protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Read Identification data-out sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Extended Device ID table (first byte) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Suspend Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Operations Allowed / Disallowed During Device States . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Protection modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 Lock Register out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Lock Register in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 Instruction set: DIO-SPI protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Instruction set: QIO-SPI protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 NVCR XIP bits setting example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 VCR XIP bits setting example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Power-up timing and VWI threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 AC measurement conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 Capacitance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 DC Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 AC Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Reset Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 VDFPN8 (MLP8) 8-lead very thin dual flat package no lead, 8 × 6 mm, package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 SO16 wide - 16-lead plastic small outline, 300 mils body width, mechanical data . . . . . . 174 TBGA 6x8 mm 24-ball package dimensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 Ordering information scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Valid Order Information Line Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 8/180 M25Q128 - 3 V List of figures List of figures Figure 1. Figure 2. Figure 3. Figure 4. Figure 5. Figure 6. Figure 7. Figure 8. Figure 9. Figure 10. Figure 11. Figure 12. Figure 13. Figure 14. Figure 15. Figure 16. Figure 17. Figure 18. Figure 19. Figure 20. Figure 21. Figure 22. Figure 23. Figure 24. Figure 25. Figure 26. Figure 27. Figure 28. Figure 29. Figure 30. Figure 31. Figure 32. Figure 33. Figure 34. Figure 35. Figure 36. Figure 37. Figure 38. Figure 39. Figure 40. Figure 41. Figure 42. Figure 43. Figure 44. Figure 45. Figure 46. Figure 47. Figure 48. Logic diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 VDFPN8 connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 SO16 connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 BGA connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Bus master and memory devices on the SPI bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Extended SPI protocol example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Hold condition activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Non Volatile and Volatile configuration Register Scheme . . . . . . . . . . . . . . . . . . . . . . . . . 33 Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Read identification instruction and data-out sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Read Data Bytes instruction and data-out sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Read Data Bytes at Higher Speed instruction and data-out sequence . . . . . . . . . . . . . . . 82 Dual Output Fast Read instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Dual I/O Fast Read instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Quad Input/Output Fast Read instruction sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Quad Input/ Output Fast Read instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Read OTP instruction and data-out sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Write Enable instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Write Disable instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Page Program instruction sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Dual Input Fast Program instruction sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Dual Input Extended Fast Program instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . 93 Quad Input Fast Program instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Quad Input Extended Fast Program instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . 95 Program OTP instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 How to permanently lock the OTP bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Subsector Erase instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Sector Erase instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Bulk Erase instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Read Status Register instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Write Status Register instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 Read Lock Register instruction and data-out sequence . . . . . . . . . . . . . . . . . . . . . . . . . . 104 Write to Lock Register instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Read Flag Status Register instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 Clear Flag Status Register instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Read NV Configuration Register instruction sequence . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Write NV Configuration Register instruction sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Read Volatile Configuration Register instruction sequence . . . . . . . . . . . . . . . . . . . . . . . 109 Write Volatile Configuration Register instruction sequence . . . . . . . . . . . . . . . . . . . . . . . 110 Read Volatile Enhanced Configuration Register instruction sequence. . . . . . . . . . . . . . . 110 Write Volatile Enhanced Configuration Register instruction sequence. . . . . . . . . . . . . . . 111 Multiple I/O Read Identification instruction and data-out sequence DIO-SPI . . . . . . . . . . 114 Dual Command Fast Read instruction and data-out sequence DIO-SPI . . . . . . . . . . . . . 114 Read OTP instruction and data-out sequence DIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Write Enable instruction sequence DIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Write Disable instruction sequence DIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Dual Command Page Program instruction sequence DSP, 02h . . . . . . . . . . . . . . . . . . . 117 Dual Command Page Program instruction sequence DSP, A2h . . . . . . . . . . . . . . . . . . . 117 9/180 List of figures Figure 49. Figure 50. Figure 51. Figure 52. Figure 53. Figure 54. Figure 55. Figure 56. Figure 57. Figure 58. Figure 59. Figure 60. Figure 61. Figure 62. Figure 63. Figure 64. Figure 65. Figure 66. Figure 67. Figure 68. Figure 69. Figure 70. Figure 71. Figure 72. Figure 73. Figure 74. Figure 75. Figure 76. Figure 77. Figure 78. Figure 79. Figure 80. Figure 81. Figure 82. Figure 83. Figure 84. Figure 85. Figure 86. Figure 87. Figure 88. Figure 89. Figure 90. Figure 91. Figure 92. Figure 93. Figure 94. Figure 95. Figure 96. Figure 97. Figure 98. Figure 99. Figure 100. M25Q128 - 3 V Dual Command Page Program instruction sequence DSP, D2h . . . . . . . . . . . . . . . . . . . 117 Program OTP instruction sequence DIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Subsector Erase instruction sequence DIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Sector Erase instruction sequence DIO-SPI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Bulk Erase instruction sequence DIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Program/Erase Suspend instruction sequence DIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . 121 Program/Erase Resume instruction sequence DIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Read Status Register instruction sequence DIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Write Status Register instruction sequence DIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Read Lock Register instruction and data-out sequence DIO-SPI. . . . . . . . . . . . . . . . . . . 123 Write to Lock Register instruction sequence DIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Read Flag Status Register instruction sequence DIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . 124 Clear Flag Status Register instruction sequence DIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . 125 Read NV Configuration Register instruction sequence DIO-SPI . . . . . . . . . . . . . . . . . . . 125 Write NV Configuration Register instruction sequence DIO-SPI . . . . . . . . . . . . . . . . . . . 126 Read Volatile Configuration Register instruction sequence DIO-SPI . . . . . . . . . . . . . . . . 127 Write Volatile Configuration Register instruction sequence DIO-SPI . . . . . . . . . . . . . . . . 127 Read Volatile Enhanced Configuration Register instruction sequence DIO-SPI . . . . . . . 128 Write Volatile Enhanced Configuration Register instruction sequence DIO-SPI . . . . . . . 129 Multiple I/O Read Identification instruction and data-out sequence QIO-SPI . . . . . . . . . . 132 Quad Command Fast Read instruction and data-out sequence QSP, 0Bh . . . . . . . . . . . 133 Quad Command Fast Read instruction and data-out sequence QSP, 6Bh . . . . . . . . . . . 133 Quad Command Fast Read instruction and data-out sequence QSP, EBh . . . . . . . . . . . 134 Read OTP instruction and data-out sequence QIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Write Enable instruction sequence QIO-SPI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Write Disable instruction sequence QIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Quad Command Page Program instruction sequence QIO-SPI, 02h. . . . . . . . . . . . . . . . 137 Quad Command Page Program instruction sequence QIO-SPI, 12h. . . . . . . . . . . . . . . . 137 Quad Command Page Program instruction sequence QIO-SPI, 32h. . . . . . . . . . . . . . . . 138 Program OTP instruction sequence QIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Subsector Erase instruction sequence QIO-SPI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Sector Erase instruction sequence QIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Bulk Erase instruction sequence QIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 Program/Erase Suspend instruction sequence QIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . 142 Program/Erase Resume instruction sequence QIO-SPI. . . . . . . . . . . . . . . . . . . . . . . . . . 143 Read Status Register instruction sequence QIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Write Status Register instruction sequence QIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 Read Lock Register instruction and data-out sequence QIO-SPI . . . . . . . . . . . . . . . . . . 146 Write to Lock Register instruction sequence QIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Read Flag Status Register instruction sequence QIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . 148 Clear Flag Status Register instruction sequence QIO-SPI . . . . . . . . . . . . . . . . . . . . . . . . 149 Read NV Configuration Register instruction sequence QIO-SPI . . . . . . . . . . . . . . . . . . . 150 Write NV Configuration Register instruction sequence QIO-SPI . . . . . . . . . . . . . . . . . . . 151 Read Volatile Configuration Register instruction sequence QIO-SPI . . . . . . . . . . . . . . . . 152 Write Volatile Configuration Register instruction sequence QIO-SPI . . . . . . . . . . . . . . . . 153 Read Volatile Enhanced Configuration Register instruction sequence QIO-SPI . . . . . . . 154 Write Volatile Enhanced Configuration Register instruction sequence QIO-SPI . . . . . . . 155 N25Q128 Read functionality Flow Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 XIP mode directly after power on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 XiP: enter by VCR 2/2 (QIOFR in normal SPI protocol example) . . . . . . . . . . . . . . . . . . . 160 Power-up timing, Fast POR selected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Power-up timing, Fast POR not selected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 10/180 M25Q128 - 3 V Figure 101. Figure 102. Figure 103. Figure 104. Figure 105. Figure 106. Figure 107. Figure 108. List of figures AC measurement I/O waveform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 Reset AC waveforms while a program or erase cycle is in progress . . . . . . . . . . . . . . . . 169 Serial input timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 Write protect setup and hold timing during WRSR when SRWD=1 . . . . . . . . . . . . . . . . . 171 Hold timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 Output timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 VPPH timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 VDFPN8 (MLP8) 8-lead very thin dual flat package no lead, 8 × 6 mm, package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Figure 109. SO16 wide - 16-lead plastic small outline, 300 mils body width, package outline . . . . . . 174 Figure 110. TBGA - 6 x 8 mm, 24-ball, mechanical package outline . . . . . . . . . . . . . . . . . . . . . . . . . . 175 11/180 Description N25Q128 - 3 V 1 Description The N25Q128 is a 128 Mbit (16Mb x 8) serial Flash memory, with advanced write protection mechanisms. It is accessed by a high speed SPI-compatible bus and features the possibility to work in XIP (“eXecution in Place”) mode. The N25Q128 supports innovative, high-performance quad/dual I/O instructions, these new instructions allow to double or quadruple the transfer bandwidth for read and program operations. Furthermore the memory can be operated with 3 different protocols: Standard SPI (Extended SPI protocol) Dual I/O SPI Quad I/O SPI The Standard SPI protocol is enriched by the new quad and dual instructions (Extended SPI protocol). For Dual I/O SPI (DIO-SPI) all the instructions codes, the addresses and the data are always transmitted across two data lines. For Quad I/O SPI (QIO-SPI) the instructions codes, the addresses and the data are always transmitted across four data lines thus enabling a tremendous improvement in both random access time and data throughput. The memory can work in “XIP mode”, that means the device only requires the addresses and not the instructions to output the data. This mode dramatically reduces random access time thus enabling many applications requiring fast code execution without shadowing the memory content on a RAM. The XIP mode can be used with QIO-SPI, DIO-SPI, or Extended SPI protocol, and can be entered and exited using different dedicated instructions to allow maximum flexibility: for applications required to enter in XIP mode right after power up of the device, this can be set as default mode by using dedicated Non Volatile Register (NVR) bits. It is also possible to reduce the power on sequence time with the Fast POR (Power on Reset) feature, enabling a reduction of the latency time before the first read instruction can be performed. Another feature is the ability to pause and resume program and erase cycles by using dedicated Program/Erase Suspend and Resume instructions. The N25Q128 memory offers the following additional Features to be configured by using the Non Volatile Configuration Register (NVCR) for default /Non-Volatile settings or by using the Volatile and Volatile Enhanced Configuration Registers for Volatile settings: the number of dummy cycles for fast read instructions (single, dual and, quad I/O) according to the operating frequency the output buffer impedance the type of SPI protocol (extended SPI, DIO-SPI or QIO-SPI) the required XIP mode Fast or standard POR sequence the Hold (Reset) functionality enabling/disabling The memory is organized as 248 (64-Kbyte) main sectors, in products with Bottom or Top architecture there are 8 64-Kbyte boot sectors, and each boot sector is further divided into 16 4-Kbyte subsectors (128 subsectors in total). The boot sectors can be erased a 4-Kbyte subsector at a time or as a 64-Kbyte sector at a time. The entire memory can be also erased at a time or by sector. 12/180 N25Q128 - 3 V Description The memory can be write protected by software using a mix of volatile and non-volatile protection features, depending on the application needs. The protection granularity is of 64Kbyte (sector granularity) for volatile protections. The N25Q128 has 64 one-time-programmable bytes (OTP bytes) that can be read and programmed using two dedicated instructions, Read OTP (ROTP) and Program OTP (POTP), respectively. These 64 bytes can be permanently locked by a particular Program OTP (POTP) sequence. Once they have been locked, they become read-only and this state cannot be reversed. Many different N25Q128 configurations are available, please refer to the ordering scheme page for the possibilities. Additional features are available as security options (The Security features are described in a dedicated Application Note). Please contact your nearest Numonyx Sales office for more information. Figure 1. Logic diagram VCC DQ0 C S W/VPP/DQ2 HOLD/DQ3 DQ1 VSS Logic_Diagram_x25x Note: Reset functionality is available in devices with a dedicated part number. See Section 16: Ordering information. Signal names Description Serial Clock Serial Data input Serial Data output Chip Select Write Protect/Enhanced Program supply voltage/additional data I/O Hold (Reset function available upon customer request)/additional data I/O Supply voltage Ground I/O Input I/O(1) I/O(2) Input I/O(3) I/O(3) – – Table 1. Signal C DQ0 DQ1 S W/VPP/DQ2 HOLD/DQ3(4) VCC VSS 1. Provides dual and quad I/O for Extended SPI protocol instructions, dual I/O for Dual I/O SPI protocol instructions, and quad I/O for Quad I/O SPI protocol instructions. 2. Provides dual and quad instruction input for Extended SPI protocol, dual instruction input for Dual I/O SPI protocol, and quad instruction input for Quad I/O SPI protocol. 3. Provides quad I/O for Extended SPI protocol instructions, and quad I/O for Quad I/O SPI protocol instructions. 4. Reset functionality available with a dedicated part number. See Section 16: Ordering information. 13/180 Description Note: N25Q128 - 3 V There is an exposed central pad on the underside of the VDFPN8 package. This is pulled, internally, to VSS, and must not be connected to any other voltage or signal line on the PCB. Figure 2. VDFPN8 connections S DQ1 W/VPP/DQ2 VSS 1 2 3 4 8 7 6 5 VCC HOLD/DQ3 C DQ0 AI13720c 1. Reset functionality available in devices with a dedicated part number. See Section 16: Ordering information. Figure 3. SO16 connections HOLD/DQ3 VCC DU DU DU DU S DQ1 1 2 3 4 5 6 7 8 16 15 14 13 12 11 10 9 C DQ0 DU DU DU DU VSS W/VPP/DQ2 AI13721c 1. DU = don’t use. 2. See Package mechanical section for package dimensions, and how to identify pin-1. 3. Reset functionality available in devices with a dedicated part number. See Section 16: Ordering information. 14/180 N25Q128 - 3 V Figure 4. BGA connections 1 2 3 4 5 Description A NC C NC VSS NC VCC NC B NC S W/VPP/DQ2 NC DQ1 NC NC C NC D NC DQ0 HOLD/DQ3 NC E NC NC NC NC NC 1. NC = No Connect. 2. See Figure 110.: TBGA - 6 x 8 mm, 24-ball, mechanical package outline. 15/180 Signal descriptions N25Q128 - 3 V 2 2.1 Signal descriptions Serial data output (DQ1) This output signal is used to transfer data serially out of the device. Data are shifted out on the falling edge of Serial Clock (C). When used as an Input, It is latched on the rising edge of the Serial Clock (C). In the Extended SPI protocol, during the Quad and Dual Input Fast Program (QIFP, DIFP) instructions and during the Quad and Dual Input Extended Fast Program (QIEFP, DIEFP) instructions, pin DQ1 is used also as an input. In the Dual I/O SPI protocol (DIO-SPI) the DQ1 pin always acts as an input/output. In the Quad I/O SPI protocol (QIO-SPI) the DQ1 pin always acts as an input/output, with the exception of the Program or Erase cycle performed with the Enhanced Program Supply Voltage (VPP). In this case the device temporarily goes in Extended SPI protocol. The protocol then becomes QIO-SPI as soon as the VPP pin voltage goes low. 2.2 Serial data input (DQ0) This input signal is used to transfer data serially into the device. It receives instructions, addresses, and the data to be programmed. Values are latched on the rising edge of Serial Clock (C). Data are shifted out on the falling edge of the Serial Clock (C). In the Extended SPI protocol, during the Quad and Dual Output Fast Read (QOFR, DOFR) and the Quad and Dual Input/Output Fast Read (QIOFR, DIOFR) instructions, pin DQ0 is also used as an input/output. In the DIO-SPI protocol the DQ0 pin always acts as an input/output. In the QIO-SPI protocol, the DQ0 pin always acts as an input/output, with the exception of the Program or Erase cycle performed with the VPP. In this case the device temporarily goes in Extended SPI protocol. Then, the protocol returns to QIO-SPI as soon as the VPP pin voltage goes low. 2.3 Serial Clock (C) This input signal provides the timing for the serial interface. Instructions, addresses, or data present at serial data input (DQ0) are latched on the rising edge of Serial Clock (C). Data are shifted out on the falling edge of the Serial Clock (C). 2.4 Chip Select (S) When this input signal is high, the device is deselected and serial data output (DQ1) is at high impedance. Unless an internal program, erase or write status register cycle is in progress, the device will be in the standby power mode (this is not the deep power-down mode). Driving Chip Select (S) low enables the device, placing it in the active power mode. After power-up, a falling edge on Chip Select (S) is required prior to the start of any instruction. 16/180 N25Q128 - 3 V Signal descriptions 2.5 Hold (HOLD) or Reset (Reset) The Hold (HOLD) signal is used to pause any serial communications with the device without deselecting the device. Reset functionality is present instead of Hold in devices with a dedicated part number. See Section 16: Ordering information. During Hold condition, the Serial Data output (DQ1) is in high impedance, and Serial Data input (DQ0) and Serial Clock (C) are Don't Care. To start the Hold condition, the device must be selected, with Chip Select (S) driven Low. For devices featuring Reset instead of Hold functionality, the Reset (Reset) input provides a hardware reset for the memory. When Reset (Reset) is driven High, the memory is in the normal operating mode. When Reset (Reset) is driven Low, the memory will enter the Reset mode. In this mode, the output is high impedance. Driving Reset (Reset) Low while an internal operation is in progress will affect this operation (write, program or erase cycle) and data may be lost. In the Extended SPI protocol, during the QOFR, QIOFR, QIFP and the Quad Extended Fast Program (QIEFP) instructions, the Hold (Reset) / DQ3 is used as an input/output (DQ3 functionality). In QIO-SPI, the Hold (Reset) / DQ3 pin acts as an I/O (DQ3 functionality), and the HOLD (Reset) functionality disabled when the device is selected. When the device is deselected (S signal is high), in parts with Reset functionality, it is possible to reset the device unless this functionality is not disabled by mean of dedicated registers bits. The HOLD (Reset) functionality can be disabled using bit 3 of the NVCR or bit 4 of the VECR. 17/180 Signal descriptions N25Q128 - 3 V 2.6 Write protect/enhanced program supply voltage (W/VPP), DQ2 W/VPP/DQ2 can be used as: A protection control input. A power supply pin. I/O in Extended SPI protocol quad instructions and in QIO-SPI protocol instructions. When the device is operated in Extended SPI protocol with single or dual instructions, the two functions W or VPP are selected by the voltage range applied to the pin. If the W/VPP input is kept in a low voltage range (0 V to VCC) the pin is seen as a control input. This input signal is used to freeze the size of the area of memory that is protected against program or erase instructions (as specified by the values in the BP[0:3] bits of the Status Register. (See Table 2.: Status register format). If VPP is in the range of VPPH, it acts as an additional power supply during the Program or Erase cycles (See Table 28.: Operating conditions). In this case VPP must be stable until the Program or Erase algorithm is completed. During the Extended SPI protocol, the QOFR and QIOFR instructions, and the QIO-SPI protocol instructions, the pin W/VPP/DQ2 is used as an input/output (DQ2 functionality). Using the Extended SPI protocol the QIFP, QIEFP and the QIO-SPI Program/Erase instructions, it is still possible to use the VPP additional power supply to speed up internal operations. However, to enable this possibility it is necessary to set bit 3 of the Volatile Enhanced Configuration Register to 0. In this case the W/VPP/DQ2 pin is used as an I/O pin until the end of the instruction sequence. After the last input data is shifted in, the application should apply VPP voltage to W/VPP/DQ2 within 200 ms to speed up the internal operations. If the VPP voltage is not applied within 200 ms the Program/Erase operations start with standard speed. The default value of the VECR bit 3 is 1, and the VPP functionality for Quad I/O modify instruction is disabled. 2.7 VCC supply voltage VCC is the supply voltage. 2.8 VSS ground VSS is the reference for the VCC supply voltage. 18/180 N25Q128 - 3 V SPI Modes 3 SPI Modes These devices can be driven by a micro controller with its SPI peripheral running in either of the two following modes: CPOL=0, CPHA=0 CPOL=1, CPHA=1 For these two modes, input data is latched in on the rising edge of Serial Clock (C), and output data is available from the falling edge of Serial Clock (C). The difference between the two modes, as shown in Figure 5, is the clock polarity when the bus master is in standby mode and not transferring data: C remains at 0 for (CPOL=0, CPHA=0) C remains at 1 for (CPOL=1, CPHA=1) Figure 5. Bus master and memory devices on the SPI bus VSS VCC R SDO SPI interface with (CPOL, CPHA) = (0, 0) or (1, 1) SDI SCK C SPI Bus Master R CS3 CS2 CS1 S W HOLD S W HOLD S W HOLD DQ1DQ0 SPI memory device VCC VSS R C DQ1 DQ0 SPI memory device VCC VSS R C DQ1DQ0 SPI memory device VCC VSS AI13725b Shown here is an example of three devices working in Extended SPI protocol for simplicity connected to an MCU, on an SPI bus. Only one device is selected at a time, so only one device drives the serial data output (DQ1) line at a time; the other devices are high impedance. Resistors R ensures that the N25Q128 is not selected if the bus master leaves the S line in the high impedance state. As the bus master may enter a state where all inputs/outputs are in high impedance at the same time (for example, when the bus master is reset), the clock line (C) must be connected to an external pull-down resistor so that, when all inputs/outputs become high impedance, the S line is pulled High while the C line is pulled Low. This ensures that S and C do not become High at the same time, and so that the tSHCH requirement is met. The typical value of R is 100 kΩ, assuming that the time constant R*Cp 19/180 SPI Modes N25Q128 - 3 V (Cp = parasitic capacitance of the bus line) is shorter than the time during which the bus master leaves the SPI bus in high impedance. Example: Cp = 50 pF, that is R*Cp = 5 µs the application must ensure that the bus master never leaves the SPI bus in the high impedance state for a time period shorter than 5 µs. The Write Protect (W) and Hold (HOLD) signals should be driven, High or Low as appropriate. Figure 6. Extended SPI protocol example CPOL CPHA 0 0 C 1 1 C DQ0 MSB DQ1 MSB AI13730 20/180 N25Q128 - 3 V SPI Protocols 4 SPI Protocols The N25Q128 memory can work with 3 different Serial protocols: Extended SPI protocol. Dual I/O SPI (DIO-SPI) protocol. Quad I/O SPI (QIO-SPI) protocol. It is possible to choose among the three protocols by means of user volatile or non-volatile configuration bits.It's not possible to mix Extended SPI, DIO-SPI, and QIO-SPI protocols. The device can operate in XIP mode in all 3 protocols. 4.1 Extended SPI protocol This is an extension of the standard (legacy) SPI protocol. Instructions are transmitted on a single data line (DQ0), while addresses and data are transmitted by one, two or four data lines (DQ0, DQ1, W/VPP(DQ2) and HOLD / (DQ3) according to the instruction. When used in the Extended SPI protocol, these devices can be driven by a micro controller in either of the two following modes: CPOL=0, CPHA=0 CPOL=1, CPHA=1 Please refer to the SPI modes for a detailed description of these two modes 4.2 Dual I/O SPI (DIO-SPI) protocol Dual I/O SPI (DIO-SPI) protocol: instructions, addresses and I/O data are always transmitted on two data lines (DQ0 and DQ1). Also when in DIO-SPI mode, the device can be driven by a micro controller in either of the two following modes: CPOL= 0, CPHA= 0 CPOL= 1, CPHA= 1 Please refer to the SPI modes for a detailed description of these two modes. Note: Extended SPI protocol Dual I/O instructions allow only address and data to be transmitted over two data lines. However, DIO-SPI allows instructions, addresses, and data to be transmitted on two data lines. This mode can be set using two ways Volatile: by setting bit 6 of the VECR to 0. The device enters DIO-SPI protocol immediately after the Write Enhanced Volatile Configuration Register sequence completes. The device returns to the default working mode (defined by NVCR) on power on. Default/ Non-Volatile: This is default mode on power-up. By setting bit 2 of the NVCR to 0. The device enters DIO-SPI protocol on the subsequent power-on. After all subsequent power-on sequences, the device still starts in DIO-SPI protocol unless bit 2 of NVCR is set to 1 (default value, corresponding to Extended SPI protocol) or bit 3 of NVCR is set to 0 (corresponding to QIO-SPI protocol). 21/180 SPI Protocols N25Q128 - 3 V 4.3 Quad SPI (QIO-SPI) protocol Quad SPI (QIO-SPI) protocol: instructions, addresses, and I/O data are always transmitted on four data lines DQ0, DQ1, W/VPP(DQ2), and HOLD / (DQ3). The exception is the Program/Erase cycle performed with the VPP, in which case the device temporarily goes to Extended SPI protocol. Going temporarily into Extended SPI protocol allows the application either to: check the polling bits: WIP bit in the Status Register or Program/Erase Controller bit in the Flag Status Register perform Program/Erase suspend functions. Note: As soon as the VPP pin voltage goes low, the protocol returns to the QIO-SPI protocol. In QIO-SPI protocol the W and HOLD/ (RESET) functionality is disabled when the device is selected (S signal low). When used in the QIO-SPI mode, these devices can be driven by a micro controller in either of the two following modes: CPOL=0, CPHA=0 CPOL=1, CPHA=1 Please refer to the SPI modes for a detailed description of the 2 modes. Note: In the Extended SPI protocol only Address and data are allowed to be transmitted on 4 data lines, However in QIO-SPI protocol, the address, data and instructions are transmitted across 4 data lines. This working mode is set in either bit 7 of the Volatile Enhanced Configuration Register (VECR) or in bit 3 of the Non Volatile Configuration Register (NVCR). This mode can be set using two ways Volatile: by setting bit 7 of the VECR to 0, the device enters QIO-SPI protocol immediately after the Write Enhanced Volatile Configuration Register sequence completes. The device returns to the default working protocol (defined by the NVCR) on the next power on. Default/ Non- Volatile: This is default protocol on power up. By setting bit 3 of the NVCR to 0, the device enters QIO-SPI protocol on the subsequent power-on. After all subsequent power-on sequences, the device still starts in QIO-SPI protocol unless bit 3 of the NVCR is set to 1 (default value, corresponding to Extended SPI mode). 22/180 N25Q128 - 3 V Operating features 5 5.1 5.1.1 Operating features Extended SPI Protocol Operating features Read Operations To read the memory content in Extended SPI protocol different instructions are available: READ, Fast Read, Dual Output Fast Read, Dual Input Output Fast Read, Quad Output Fast Read and Quad Input Output Fast read, allowing the application to choose an instruction to send addresses and receive data by one, two or four data lines. Note: In the Extended SPI protocol the instruction code is always sent on one data line (DQ0): to use two or four data lines the user must use either the DIO-SPI or the QIO-SPI protocol respectively. For fast read instructions the number of dummy clock cycles is configurable by using VCR bits [7:4] or NVCR bits [15:12]. After a successful reading instruction a reduced tSHSL equal to 20 ns is allowed to further improve random access time (in all the other cases tSHSL should be at least 50 ns). See Table 32.: AC Characteristics. 5.1.2 Page programming To program one data byte, two instructions are required: write enable (WREN), which is one byte, and a page program (PP) sequence, which consists of four bytes plus data. This is followed by the internal program cycle (of duration tPP). To spread this overhead, the page program (PP) instruction allows up to 256 bytes to be programmed at a time (changing bits from ‘1’ to ‘0’), provided that they lie in consecutive addresses on the same page of memory. For optimized timings, it is recommended to use the page program (PP) instruction to program all consecutive targeted bytes in a single sequence versus using several page program (PP) sequences with each containing only a few bytes (see Section 5.2.3: Page programming and Table 32: AC Characteristics). 5.1.3 Dual input fast program The dual input fast program (DIFP) instruction makes it possible to program up to 256 bytes using two input pins at the same time (by changing bits from ‘1’ to ‘0’). For optimized timings, it is recommended to use the DIFP instruction to program all consecutive targeted bytes in a single sequence rather using several DIFP sequences each containing only a few bytes (see Section 9.1.12: Dual Input Fast Program (DIFP)). 5.1.4 Dual Input Extended Fast Program The Dual Input Extended Fast Program (DIEFP) instruction is an enhanced version of the Dual Input Fast Program instruction, allowing to transmit address across two data lines. For optimized timings, it is recommended to use the DIEFP instruction to program all consecutive targeted bytes in a single sequence rather than using several DIEFP sequences, each containing only a few bytes. 23/180 Operating features N25Q128 - 3 V 5.1.5 Quad Input Fast Program The Quad Input Fast Program (QIFP) instruction makes it possible to program up to 256 bytes using 4 input pins at the same time (by changing bits from 1 to 0). For optimized timings, it is recommended to use the QIFP instruction to program all consecutive targeted bytes in a single sequence rather than using several QIFP sequences each containing only a few bytes. 5.1.6 Quad Input Extended Fast Program The Quad Input Extended Fast Program (QIEFP) instruction is an enhanced version of the Quad Input Fast Program instruction, allowing parallel input on the 4 input pins, including the address being sent to the device. For optimized timings, it is recommended to use the QIEFP instruction to program all consecutive targeted bytes in a single sequence rather than using several QIEFP sequences each containing only a few bytes. 5.1.7 Subsector erase, sector erase and bulk erase The page program (PP) instruction allows bits to be reset from ‘1’ to’0’. In order to do this the bytes of memory need to be erased to all 1s (FFh). This can be achieved as follows: a subsector at a time, using the subsector erase (SSE) instruction (only available on the 8 boot sectors at the bottom or top addressable area of a device with a dedicated part number); See Section 16: Ordering information; a sector at a time, using the sector erase (SE) instruction; throughout the entire memory, using the bulk erase (BE) instruction. This starts an internal erase cycle (of duration tSSE, tSE or tBE). The erase instruction must be preceded by a write enable (WREN) instruction. 5.1.8 Polling during a write, program or erase cycle A further improvement in the time to Write Status Register (WRSR), POTP, PP, DIFP,DIEFP,QIFP, QIEFP or Erase (SSE, SE or BE) can be achieved by not waiting for the worst case delay (tW, tPP, tSSE, tSE, or tBE). The application program can monitor if the required internal operation is completed, by polling the dedicated register bits to establish when the previous Write, Program or Erase cycle is complete. The information on the memory being in progress for a Program, Erase, or Write instruction can be checked either on the Write In Progress (WIP) bit of the Status Register or in the Program/Erase Controller bit of the Flag Status Register. Note: The Program/Erase Controller bit is the opposite state of the WIP bit in the Status Register. In the Flag Status Register additional information can be checked, as eventual Program/Erase failures by mean of the Program or erase Error bits. 24/180 N25Q128 - 3 V Operating features 5.1.9 Active power and standby power modes When Chip Select (S) is Low, the device is selected, and in the active power mode. When Chip Select (S) is High, the device is deselected, but could remain in the active power mode until all internal cycles have completed (program, erase, write status register). The device then goes in to the standby power mode. The device consumption drops to ICC1. 5.1.10 Hold (or Reset) condition The Hold (HOLD) signal is used to pause serial communications with the device without resetting the clocking sequence. However, taking this signal Low does not terminate any write status register, program or erase cycle that is currently in progress. To enter the hold condition, the device must be selected, with Chip Select (S) Low. The hold condition starts on the falling edge of the Hold (HOLD) signal, provided that the Serial Clock (C) is Low (as shown in Figure 7). The hold condition ends on the rising edge of the Hold (HOLD) signal, provided that the Serial Clock (C) is Low. If the falling edge does not coincide with Serial Clock (C) being Low, the hold condition starts after Serial Clock (C) next goes Low. Similarly, if the rising edge does not coincide with Serial Clock (C) being Low, the hold condition ends after Serial Clock (C) next goes Low (this is shown in Figure 7). During the hold condition, the serial data output (DQ1) is high impedance, and serial data input (DQ0) and Serial Clock (C) are don’t care. Normally, the device is kept selected, with Chip Select (S) driven Low for the whole duration of the hold condition. This is to ensure that the state of the internal logic remains unchanged from the moment of entering the hold condition. If Chip Select (S) goes High while the device is in the Hold condition, this has the effect of resetting the internal logic of the device. To restart communication with the device, it is necessary to drive Hold (HOLD) High, and then to drive Chip Select (S) Low. This prevents the device from going back to the hold condition. Figure 7. Hold condition activation C HOLD Hold condition (standard use) Hold condition (non-standard use) AI02029D Reset functionality is available instead of Hold in parts with a dedicated part number. See Section 16: Ordering information. Driving Reset (Reset) Low while an internal operation is in progress will affect this operation (write, program or erase cycle) and data may be lost. On Reset going Low, the device enters 25/180 Operating features N25Q128 - 3 V the reset mode and a time of tRHSL is then required before the device can be reselected by driving Chip Select (S) Low. For the value of tRHSL, see Table 32.: AC Characteristics. All the lock bits are reset to 0 after a Reset Low pulse. The Hold/Reset feature is not available when the Hold (Reset) / DQ3 pin is used as I/O (DQ3 functionality) during Quad Instructions: QOFR, QIOFR,QIFP and QIEFP. The Hold/Reset feature can be disabled by using of the bit 4 of the VECR. 26/180 N25Q128 - 3 V Operating features 5.2 Dual SPI (DIO-SPI) Protocol In the Dual SPI (DIO-SPI) protocol all the instructions, addresses and I/O data are transmitted on two data lines. All the functionality available in the Extended SPI protocol is also available in the DIO-SPI protocol. The DIO-SPI instructions are comparable with the Extended SPI instructions; however, in DIO-SPI, the instructions are multiplexed on the two data lines, DQ0 and DQ1. The only exceptions are the READ, Quad Read, and Program instructions, which are not available in DIO-SPI protocol, and the RDID instruction, which is replaced in the DIO-SPI protocol by the Multiple I/O Read Identification (MIORDID) instruction. The Multiple I/O Read Identification Instruction reads just the standard SPI electronic ID (3 bytes), while the Extended SPI protocol RDID instruction allows access to the UID bytes. To help the application code port from Extended SPI to DIO-SPI protocol, the instructions available in the DIO-SPI protocol have the same operation code as the Extended SPI protocol, the only exception being the MIORDID instruction. 5.2.1 Multiple Read Identification The Multiple I/O Read Identification (MIORDID) instruction is available to read the device electronic ID.With respect to the RDID instruction of the Extended SPI protocol, the output data, shifted out on the 2 data lines DQ0 and DQ1. Since the read ID instruction in the DIO-SPI protocol is limited to 3 bytes of the standard electronic ID, the UID bytes are not read with the MIORDID instruction 5.2.2 Dual Command Fast reading Reading the memory data multiplexing the instruction, the addresses and the output data on 2 data lines can be achieved in DIO-SPI protocol by mean of the Dual Command Fast Read instruction, that has 3 instruction codes (BBh, 3Bh and 0Bh) to help the application code porting from Extended SPI protocol to DIO-SPI protocol. Of course quad and single I/O Read instructions are not available in DIO-SPI mode. For Dual Command fast read instructions the number of dummy clock cycles is configurable by using VCR bits [7:4] or NVCR bits [15:12]. After a successful reading instruction, a reduced tSHSL equal to 20ns is allowed to further improve random access time (in all the other cases tSHSL should be at least 50 ns). See Table 32.: AC Characteristics. 5.2.3 Page programming Programming the memory by transmitting the instruction, addresses and the output data on 2 data lines can be achieved in DIO-SPI protocol by using the Dual Command Page Program instruction, that has 3 instruction codes (D2h, A2h and 02h) to help port from Extended SPI protocol to DIO-SPI protocol Quad and single input Program instructions are not available in DIO-SPI mode. 27/180 Operating features N25Q128 - 3 V The DIO-SPI protocol is similar to the Extended SPI protocol i.e., to program one data byte two instructions are required: Write Enable (WREN), which is one byte, and a Dual Command Page Program (DCPP) sequence, which consists of four bytes plus data. This is followed by the internal Program cycle (of duration tPP). To spread this overhead, the Dual Command Page Program (DCPP) instruction allows up to 256 bytes to be programmed at a time (changing bits from 1 to 0), provided that they are consecutive addresses on the same page of memory. For optimized timings, it is recommended to use the DCPP instruction to program all consecutive targeted bytes in a single sequence versus using several DCPP sequences with each containing only a few bytes. See Table 32.: AC Characteristics. 5.2.4 Subsector Erase, Sector Erase and Bulk Erase Similar to the Extended SPI protocol, in the DIO-SPI protocol to erase the memory bytes to all 1s (FFh) the Subsector Erase (SSE), the Sector Erase (SE) and the Bulk Erase (BE) instructions are available. These instructions start an internal Erase cycle (of duration tSSE, tSE or tBE). The Erase instruction must be preceded by a Write Enable (WREN) instruction. Subsector Erase is only available on the 8 Bottom (Top) boot sectors, and is not available in uniform architecture parts 5.2.5 Polling during a Write, Program or Erase cycle Similar to the Extended SPI protocol, in the DIO-SPI protocol it is possible to monitor if the internal write, program or erase operation is completed, by polling the dedicated register bits by using the Read Status Register (RDSR) or Read Flag Status Register (RFSR) instructions, the only obvious difference is that instruction codes, addresses and output data are transmitted across two data lines. 5.2.6 Read and Modify registers Similar to the Extended SPI protocol, the only obvious difference is that instruction codes, addresses and output data are transmitted across two data lines 5.2.7 Active Power and Standby Power modes Similar to the Extended SPI protocol, when Chip Select (S) is Low, the device is selected, and in the Active Power mode. When Chip Select (S) is High, the device is deselected, but could remain in the Active Power mode until all internal cycles have completed (Program, Erase, Write Cycles). The device then goes in to the Standby Power mode. The device consumption drops to ICC1. 5.2.8 HOLD (or Reset) condition The HOLD (or Reset i.e. for parts having the reset functionality instead of hold pin) signal has exactly the same behavior in DIO-SPI protocol as do in Extended SPI protocol, so please refer to section 5.1.10, Hold (or Reset) condition” in the Extend SPI protocol section for further details. 28/180 N25Q128 - 3 V Operating features 5.3 Quad SPI (QIO-SPI)Protocol In the Quad SPI (QIO-SPI) protocol all the Instructions, addresses and I/O data are transmitted on four data lines, with the exception of the polling instructions performed during a Program or Erase cycle performed with VPP, in this case the device temporarily goes in Extended SPI protocol. The protocol again becomes QIO-SPI as soon as the VPP voltage goes low. All the functionality available in the Extended SPI protocol are also available in the QIO-SPI mode, with equivalent instruction transmitted on the 4 data lines DQ0, DQ1, DQ2 and DQ3. The exceptions are the READ, Dual Read and Dual Program instructions, that are not available in QIO-SPI protocol, and the RDID instruction, that is replaced in the QIO-SPI protocol by the Multiple I/O Read Identification (MIORDID) instruction. The Multiple I/O Read Instruction reads just the standard SPI electronic ID (3 bytes), while with the Extended SPI protocol RDID instruction is possible to access also the UID bytes. To help the application code port from Extended SPI to QIO-SPI protocol, the instructions available in the QIO-SPI protocol have the same operation code as in the Extended SPI protocol, the only exception is the MIORDID instruction. 5.3.1 Multiple Read Identification The Multiple I/O Read Identification (MIORDID) instruction is available to read the device electronic ID. With respect to the RDID instruction of the Extended SPI protocol, the output data, shifted out on the 4 data lines DQ0, DQ1, DQ2 and DQ3. Since in the QIO-SPI protocol the Read ID instruction is limited to 3 bytes of the standard electronic ID, the UID bytes are not read with the MIORDID instruction. 5.3.2 Quad Command Fast reading The Array Data can be read by the Quad Command Fast Read instruction using 3 instructions (EBh, 6Bh and 0Bh) to help the application code port from Extended SPI protocol to DIO-SPI protocol. The instruction, address and output data are transmitted across 4 data lines. The Dual and Single I/O Read instructions are not available in QIO-SPI protocol. 5.3.3 QUAD Command Page programming The memory can be programmed in QIO-SPI protocol by the Quad Command Page Program instruction using (02h, 12h and 32h). The instruction, address and input data are transmitted across 4 data lines The Dual and Single I/O Program instructions are not available in QIO-SPI protocol Programming the memory by multiplexing the instruction, the addresses and the output data on 4 wires can be achieved in QIO-SPI protocol by mean of the Quad Command Page Program instruction, that has 3 instruction codes (02h, 12h and 32h) to help the application code porting from Extended SPI protocol to QIO-SPI protocol. Similar to the Extended SPI protocol in the QIO-SPI protocol, to program one data byte two instructions are required: Write Enable (WREN), which is one byte, and Quad Command Page Program (QCPP) sequence, which consists of instruction (one byte), address (3 bytes) and input data. 29/180 Operating features This is followed by the internal Program cycle (of duration tPP). N25Q128 - 3 V To spread this overhead, the Quad Command Page Program (QCPP) instruction allows up to 256 bytes to be programmed at a time (changing bits from 1 to 0), provided that they are in consecutive addresses on the same page of memory. For optimized timings, it is recommended to use the QCPP instruction to program all consecutive targeted bytes in a single sequence versus using several QCPP sequences with each containing only a few bytes. See Table 32.: AC Characteristics. The QCPP instruction is transmitted across 4 data lines except when VPP is raised to VPPH. The VPP can be raised to VPPH to decrease programming time (provided that the bit 3 of the VECR has been set to 0 in advance). When bit 3 of VECR is set to 0 after the Quad Command Page Program instruction sequence has been received, the memory temporarily goes in Extended SPI protocol, and is possible to perform polling instructions (checking the WIP bit of the Status Register or the Program/Erase Controller bit of the Flag Status Register) or Program/Erase Suspend instruction even if DQ2 is temporarily used in this VPP functionality. The memory automatically comes back in QIO-SPI protocol as soon as the VPP pin goes Low. 5.3.4 Subsector Erase, Sector Erase and Bulk Erase Similar to the Extended SPI protocol, Subsector Erase (SSE)(1), the Sector Erase (SE) and the Bulk Erase (BE) instructions are used to erase the memory in the QIO-SPI protocol. These instructions start an internal Erase cycle (of duration tSSE, tSE or tBE). The Erase instruction must be preceded by a Write Enable (WREN) instruction. The erase instructions are transmitted across 4 data lines unless the VPP is raised to VPPH. The VPP can be raised to VPPH to decrease erasing time, provided that the bit 3 of the VECR has been set to 0 in advance. In this case, after the erase instruction sequence has been received, the memory temporarily goes in extended SPI protocol, and it is possible to perform polling instructions (checking the WIP bit of the Status Register or the Program/Erase Controller bit of the Flag Status Register) or Program/Erase Suspend instruction even if DQ2 is temporarily used in this VPP functionality. The memory automatically comes back in QIO-SPI protocol as soon as the VPP pin goes Low. Note: Subsector Erase is only available on the 8 Bottom (Top) boot sectors, and is not available in uniform architecture parts 5.3.5 Polling during a Write, Program or Erase cycle It is possible to check if the internal write, program or erase operation is completed, by polling the dedicated register bits of the Read Status Register (RDSR) or Read Flag Status Register (FSR). When the Program or Erase cycle is performed with the VPP, the device temporarily goes in single I/O SPI mode. The protocol became again QIO-SPI as soon as the VPP pin voltage goes low. 30/180 N25Q128 - 3 V Operating features 5.3.6 Read and Modify registers The read and modify register instructions are available and behave in QIO-SPI protocol exactly as they do in Extended SPI protocol, the only difference is that instruction codes, addresses and output data are transmitted across 4 data lines. 5.3.7 Active Power and Standby Power modes Exactly as in Extended SPI protocol, when Chip Select (S) is Low, the device is selected, and in the Active Power mode. When Chip Select (S) is High, the device is deselected, but could remain in the Active Power mode until all internal (Program, Erase, Write) Cycles have completed. The device then goes in to the Standby Power mode. The device consumption drops to ICC1. 5.3.8 HOLD (or Reset) condition The HOLD (Hold) feature (or Reset feature, for parts having the reset functionality instead of hold) is disabled in QIO-SPI protocol when the device is selected: the Hold (or Reset)/ DQ3 pin always behaves as an I/O pin (DQ3 function) when the device is deselected. For parts with reset functionality, it is still possible to reset the memory when it is deselected (C signal high). 5.3.9 VPP pin Enhanced Supply Voltage feature It is possible in the QIO-SPI protocol to use the VPP pin as an enhanced supply voltage, but the intention to use VPP as accelerated supply voltage must be declared by setting bit 3 of the VECR to 0. In this case, to accelerate the Program cycle the VPP pin must be raised to VPPH after the device has received the last data to be programmed within 200ms. If the VPP is not raised within 200ms, the program operation starts with the standard internal cycle speed as if the Vpp high voltage were not used, and a flag error appears on Flag Status Register bit 3". 31/180 Volatile and Non Volatile Registers N25Q128 - 3 V 6 Volatile and Non Volatile Registers The device features many different registers to store, in volatile or non volatile mode, many parameters and operating configurations: Legacy SPI Status Register 3 configuration registers: – – – Non Volatile Configuration Register (NVCR), 16 bits Volatile Configuration Register (VCR), 8 bits Volatile Enhanced Configuration Register (VECR), 8 bits The Non Volatile Configuration Register (NVCR) affects the memory configuration starting from the successive power-on. It can be used to make the memory start in a determined condition. The VCR and VECR affect the memory configuration after every execution of the related Write Volatile configuration Register (WRVCR) and Write Enhanced Volatile Configuration register (WRVECR) instructions. These instructions overwrite the memory configuration set at POR by NVCR. As described in Figure 8.: Non Volatile and Volatile configuration Register Scheme, the working condition of the memory is set by an internal configuration register, which is not accessible by the user. The working parameters of the internal configuration register are loaded from the NVCR during the boot phase of the device. In this sense the NVCR can be seen as having the default settings of the memory. During the normal life of the application, every time a write volatile or enhanced volatile configuration register instruction is performed, the new configuration parameters set in the volatile registers are also copied in the internal configuration register, thus instantly affecting the memory behavior. Please note that on the next power on the memory will start again in the working protocol set by the Non Volatile Register parameters. 32/180 N25Q128 - 3 V Figure 8. Volatile and Non Volatile Registers Non Volatile and Volatile configuration Register Scheme NVCR (Non Volatile Configuratio n Register) VCR (Volatile Co nfiguratio n Register) and VECR ( Volatile Enhanced Co nfiguratio n Register) Register download executed only during the power on phase Registers download executed after a WRVCR or WRVECR instructions, it overwrites NVCR configurations on iCR i CR (internal Configuration Register) Device behaviour A Flag Status Register (FSR), 8 bits, is also available to check the status of the device, detecting possible errors or a Program/Erase internal cycle in progress. Each register can be read and modified by means of dedicated instructions in all the 3 protocols (Extended SPI, DIO-SPI, and QIO-SPI). Reading time for all registers is comparable; writing time instead is very different: NVCR bits are set as Flash Cell memory content requiring a longer time to perform internal writing cycles. See Table 32.: AC Characteristics. 33/180 Volatile and Non Volatile Registers N25Q128 - 3 V 6.1 Legacy SPI Status Register The Status Register contains a number of status and control bits that can be read or set by specific instructions: Read Status Register (RDSR) and Write Status Register (WRSR). This is available in all the 3 protocols (Extended SPI, DIO-SPI, and QIO-SPI). Table 2. b7 SRWD BP3 TB BP2 BP1 BP0 WEL Status register format b0 WIP Status register write protect Top/bottom bit Block protect bits Write enable latch bit Write in progress bit 6.1.1 WIP bit The Write In Progress (WIP) bit set to 1 indicates that the memory is busy with a Write Status Register, Program or Erase cycle. 0 indicates no cycle is in progress. 6.1.2 WEL bit The Write Enable Latch (WEL) bit set to 1 indicates that the internal Write Enable Latch is set. When set to 0 the internal Write Enable Latch is reset and no Write Status Register, Program or Erase instruction is accepted. 6.1.3 BP3, BP2, BP1, BP0 bits The Block Protect (BP3, BP2, BP1, BP0) bits are non-volatile. They define the size of the area to be software protected against Program and Erase instructions. These bits are written with the Write Status Register (WRSR) instruction. When one or more of the Block Protect (BP3, BP2, BP1, BP0) bits is set to 1, the relevant memory area, as defined in Table 9.: Protected area sizes (TB bit = 0) and Table 10.: Protected area sizes (TB bit = 1), becomes protected against all program and erase instructions. The Block Protect (BP3, BP2, BP1, BP0) bits can be written provided that the Hardware Protected mode has not been set. The Bulk Erase (BE) instruction is executed if, and only if, all Block Protect (BP3, BP2, BP1, BP0) bits are 0. 6.1.4 TB bit The Top/Bottom (TB) bit is non-volatile. It can be set and reset with the Write Status Register (WRSR) instruction provided that the Write Enable (WREN) instruction has been issued. 34/180 N25Q128 - 3 V Volatile and Non Volatile Registers The Top/Bottom (TB) bit is used in conjunction with the Block Protect (BP3, BP2, BP1, BP0) bits to determine if the protected area defined by the Block Protect bits starts from the top or the bottom of the memory array: When TB is reset to '0' (default value), the area protected by the Block Protect bits starts from the top of the memory array. When TB is set to '1', the area protected by the Block Protect bits starts from the bottom of the memory array. The TB bit cannot be written when the SRWD bit is set to '1' and the W pin is driven Low. 6.1.5 SRWD bit The Status Register Write Disable (SRWD) bit is operated in conjunction with the Write Protect (W/VPP) signal. The Status Register Write Disable (SRWD) bit and the Write Protect (W/VPP) signal allow the device to be put in the hardware protected mode (when the Status Register Write Disable (SRWD) bit is set to '1', and Write Protect ((W/VPP) is driven Low). In this mode, the non-volatile bits of the Status Register (TB, BP3, BP2, BP1, BP0) become read-only bits and the Write Status Register (WRSR) instruction is no longer accepted for execution. 6.2 Non Volatile Configuration Register The Non Volatile Configuration Register (NVCR) bits affects the default memory configuration after power-on. It can be used to make the memory start in the configuration to fit the application requirements. The device is delivered with Non Volatile Configuration Register (NVCR) bits all erased to 1 (FFFFh). The purpose of the NVCR is to define the default memory settings after the power-on sequence related to many features: The number of dummy clock cycle for fast read instructions, XIP mode configurations, output driver strengths, fast POR sequence, Reset (or Hold) disabling Multiple I/O protocol enabling. The NVCR can be read by the Read Non Volatile Configuration Register (RDNVCR) instruction and written by the Write Non Volatile Configuration Register (WRNVCR) in all the 3 available SPI protocols. See the sections that follow as well as Table 3.: Non-Volatile Configuration Register. 35/180 Volatile and Non Volatile Registers N25Q128 - 3 V Table 3. Bit Non-Volatile Configuration Register Parameter Value 0000 0001 0010 0011 0100 0101 0110 0111 Description As '1111' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Target on maximum allowed frequency fc (108MHz) and to guarantee backward compatibility (default) XIP for SIO Read XIP for DOFR XIP for DIOFR XIP for QOFR XIP for QIOFR reserved reserved XIP disabled (default) reserved 90 60 45 reserved 20 15 Impedance at Vcc/2 To optimize instruction execution (FASTREAD, DOFR,DIOFR,QOFR, QIOFR, ROTP) according to the frequency Note NVCR 1000 Dummy clock 1001 cycle 1010 1011 1100 1101 1110 1111 000 001 010 NVCR XIP enabling at POR 011 100 101 110 111 000 001 010 Output Driver 011 Strength 100 101 110 NVCR 36/180 N25Q128 - 3 V Table 3. Bit Volatile and Non Volatile Registers Non-Volatile Configuration Register Parameter Value 111 0 Enabled Disabled (default) disabled Disable Pad Hold/Reset functionality 1 0 1 0 1 xx enabled (default) enabled Enable command on four input line disabled (default) enabled Enable command on two input line disabled (default) Don't care Default value = "11" Fast POR x READ Reset/Hold disable Quad Input Command Dual Input Command Reserved Description 30 (default) POR phase < 100us only read available POR phase ~ 700us all instructions available Note NVCR 1 0 NVCR NVCR NVCR NVCR 6.2.1 Dummy clock cycle NV configuration bits (NVCR bits from 15 to 12) The bits from 15 to 12 of the Non Volatile Configuration register store the default settings for the dummy clock cycles number after the fast read instructions (in all the 3 available protocols). The dummy clock cycles number can be set from 1 up to 15 as described here, according to operating frequency (the higher is the operating frequency, the bigger must be the dummy clock cycle number) to optimize the fast read instructions performance. The default values of these bits allow the memory to be safely used with fast read instructions at the maximum frequency (108 MHz). Please note that if the dummy clock number is not sufficient for the operating frequency, the memory reads wrong data. Table 4. Maximum allowed frequency (MHz) Maximum allowed frequency (MHz)(1) Dummy Clock 1 2 3 4 5 6 7 8 9 10 FASTREAD 50 95 105 108 108 108 108 108 108 108 DOFR 50 85 95 105 108 108 108 108 108 108 DIOFR 39 59 75 88 94 105 108 108 108 108 QOFR 43 56 70 83 94 105 108 108 108 108 QIOFR 20 39 49 59 69 78 86 95 105 108 1. All values are guaranteed by characterization and not 100% tested in production. 37/180 Volatile and Non Volatile Registers N25Q128 - 3 V 6.2.2 XIP NV configuration bits (NVCR bits from 11 to 9) The bits from 11 to 9 of the Non Volatile Configuration register store the default settings for the XIP operation, allowing the memory to start working directly on the required XIP mode after successive POR sequence: the device then accepts only address on one, two, or four wires (skipping the instruction) depending on the NVCR XIP bits settings. The default settings for the XIP bits of the NVCR enable the memory to start working in Extended SPI mode after the POR sequence (XIP directly after POR is disabled). 6.2.3 Output Driver Strength NV configuration bits (NVCR bits from 8 to 6) The bits from 8 to 6 of the Non Volatile Configuration register store the default settings for the output driver strength, enabling to optimize the impedance at Vcc/2 output voltage for the specific application. The default values of Output Driver Strength bits of the NVCR set the output impedance at Vcc/2 equal to 30 Ohms. 6.2.4 Fast POR NV configuration bit (NVCR bit 5) The bit 5 of the NVCR enables the FAST POR sequence to speed up the application boot phase before the first READ instruction: if enabled, the FAST POR allows to perform the first read operation after less than 100us. Please note that this timing is valid only for the reading operations: if a modify instruction is then required, after the first WREN instruction the complete POR phase will be performed, resulting in latency time between the WREN and the receiving of the modify instruction (~500us). During this latency time, when the power on second phase is running, no instruction will be accepted except the standard polling instructions either on the Flag Status register or in the Status Register. The default values of Fast POR bit of the NVCR is set to disable the Fast POR feature, in this case the POR sequence requires the standard value of ~500us and after the first WREN instruction no relevant latency time is needed. 6.2.5 Hold (Reset) disable NV configuration bit (NVCR bit 4) The Hold (RESET) disable bit can be used to disable the Hold (Reset) functionality of the Hold (Reset) / DQ3 pin as described in Table 3.: Non-Volatile Configuration Register. This feature can be useful to avoid accidental Hold or Reset condition entries in applications that never require the Hold (Reset) functionality. The default values of Hold (Reset) bit of the NVCR is set to enable the Hold (Reset) functionality. Note: Reset functionality is available instead of Hold in devices with a dedicated part number. See Section 16: Ordering information. 6.2.6 Quad Input NV configuration bit (NVCR bit 3) The Quad Input NV configuration bit can be used to make the memory start working in QIOSPI protocol directly after the power on sequence. The products are delivered with this set to 1, making the memory default in Extended SPI protocol, if the application sets this bit to 0 the device will enter in QIO-SPI protocol right after the next power on. Please note that in case both QIO-SPI and DIO-SPI are enabled (both bit 3 and bit 2 of the Non Volatile Configuration Register set to 0), the memory will work in QIO-SPI. 38/180 N25Q128 - 3 V Volatile and Non Volatile Registers 6.2.7 Dual Input NV configuration bit (NVCR bit 2) The Dual Input NV configuration bit can be used to make the memory start working in DIOSPI protocol directly after the power on sequence. The products are delivered with this set to 1, making the memory default in Extended SPI protocol, if the application sets this bit to 0 the device will enter in QIO-SPI protocol right after the next power on. Please note that in case both QIO-SPI and DIO-SPI are enabled (both bit 3 and bit 2 of the Non Volatile Configuration Register set to 0), the memory will work in QIO-SPI. 6.3 Volatile Configuration Register The Volatile Configuration Register (VCR) affects the memory configuration after every execution of Write Volatile Configuration Register (WRVCR) instruction: this instruction overwrite the memory configuration set at POR by the Non Volatile Configuration Register (NVCR). Its purpose is to define the dummy clock cycles number and to make the device ready to enter in the required XIP mode. 39/180 Volatile and Non Volatile Registers N25Q128 - 3 V Table 5. Bit Volatile Configuration Register Parameter Value 0000 0001 0010 0011 0100 0101 0110 0111 Description As '1111' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Target on maximum allowed frequency fc (108MHz) and to guarantee backward compatibility (default) Ready to enter XIP mode To make the data on DQ0 during the first dummy clock NOT “Don’t Care.” For devices with feature set digit equal to 2 or 4 XIP disabled (default) in the part number (Basic XiP), this bit is always Don't Care" reserved Fixed value = 000b To optimize instruction execution (FASTREAD, DOFR,DIOFR,QOFR, QIOFR, ROTP) according to the frequency Note VCR 1000 Dummy clock 1001 cycle 1010 1011 1100 1101 1110 1111 0 VCR XIP 1 VCR Reserved xxx 6.3.1 Dummy clock cycle: VCR bits 7 to 4 The bits from 7 to 4 of the Volatile Configuration Register, as the bits from 15 to 12 of the Volatile Configuration register, set the dummy clock cycles number after the fast read instructions (in all the 3 available protocols). The dummy clock cycles number can be set from 1 up to 15 as described in Table 5.: Volatile Configuration Register, according to operating frequency (the higher is the operating frequency, the bigger must be the dummy clock cycle number, according to Table 4.: Maximum allowed frequency (MHz)) to optimize the fast read instructions performance. Note: If the dummy clock number is not sufficient for the operating frequency, the memory reads wrong data. 40/180 N25Q128 - 3 V Volatile and Non Volatile Registers 6.3.2 XIP Volatile Configuration bits (VCR bit 3) The bit 3 of the Volatile Configuration Register is the XIP enabling bit, this bit must be set to 0 to enable the memory working on XIP mode. For devices with a feature set digit equal to 2 or 4 in the part number (Basic XiP), this bit is always Don't Care, and it is possible to operate the memory in XIP mode without setting it to 0. See Section 16: Ordering information. 6.4 Volatile Enhanced Configuration Register The Volatile Enhanced Configuration Register (VECR) affects the memory configuration after every execution of Write Volatile Enhanced Configuration Register (WRVECR) instruction: this instruction overwrite the memory configuration set during the POR sequence by the Non Volatile Configuration Register (NVCR). Its purpose is: enabling of QIO-SPI protocol and DIO-SPI protocol Warning: WARNING: in case of both QIO-SPI and DIO-SPI enabled, the memory works in QIO-SPI HOLD (Reset) functionality disabling To enable the VPP functionality in Quad I/O modify operations To define output driver strength (3 bit) 41/180 Volatile and Non Volatile Registers N25Q128 - 3 V Table 6. Bit VECR Volatile Enhanced Configuration Register Parameter Quad Input Command Dual Input Command Reserved Reset/Hold disable Accelerator pin enable in QIO-SPI protocol or in QIFP/QIEFP 0 1 0 1 x 0 1 0 1 000 001 010 Value Description Enabled Enable command on four input lines Disabled (default) Enabled Enable command on two input lines Disabled (default) Reserved Disabled Disable Pad Hold/Reset functionality Enabled (default) Enabled Disabled (default) reserved 90 60 45 reserved 20 15 30 (default) Impedance at VCC/2 The bit must be considered in case of QIFP, QIEFP, or QIO-SPI protocol. It is “Don’t Care” otherwise. Fixed value = 0b Note VECR VECR VECR VECR VECR Output Driver 011 Strength 100 101 110 111 6.4.1 Quad Input Command VECR The Quad Input Command configuration bit can be used to make the memory start working in QIO-SPI protocol directly after the Write Volatile Enhanced Configuration Register (WRVECR) instruction. The default value of this bit is 1, corresponding to Extended SPI protocol, If this bit is set to 0 the memory works in QIO-SPI protocol. If VECR bit 7 is set back to 1 the memory start working again in Extended SPI protocol, unless the bit 6 is set to 0 (in this case the memory start working in DIO-SPI mode). Please note that in case both QIO-SPI and DIO-SPI are enabled (both bit 7and bit 6 of the VECR set to 0), the memory will work in QIO-SPI. 6.4.2 Dual Input Command VECR The Dual Input Command configuration bit can be used to make the memory start working in DIO-SPI protocol directly after the Write Volatile Enhanced Configuration Register (WVECR) instruction. The default value of this bit is 1, corresponding to Extended SPI protocol, if this bit is set to 0 the memory works in DIO-SPI protocol (unless the Volatile Enhanced Configuration Register bit 7 is also set to 0). If the Volatile Enhanced Configuration Register bit 6 is set back to 1 the memory start working again in Extended SPI protocol. 42/180 N25Q128 - 3 V Volatile and Non Volatile Registers Please note that in case both QIO-SPI and DIO-SPI are enabled (both bit 7 and bit 6 of the VECR are set to 0), the memory will work in QIO-SPI. 6.4.3 Reset/Hold disable VECR The Hold (RESET) disable bit can be used to disable the Hold (Reset) functionality of the Hold (Reset) / DQ3 pin right after the Write Volatile Enhanced Configuration Register (WVECR) instruction. This feature can be useful to avoid accidental Hold or Reset condition entries in applications that never require the Hold (Reset) functionality. If this bit is set to 0 the Hold (Reset) functionality is disabled, it is possible to enable it back by setting this bit to 1. Please note that after the next power on the Hold (Reset) functionality will be enabled again unless the bit 4 of the Non Volatile Configuration Register is set to 0. Note: Reset functionality is available instead of Hold in devices with a dedicated part number. See Section 16: Ordering information. 6.4.4 Accelerator pin enable: QIO-SPI protocol / QIFP/QIEFP VECR The bit 3 of the Volatile Enhanced Configuration Register determine whether is possible or not to use the Vpp accelerating voltage to speed up internal modify operation with Quad program and erase instructions (both in Extended or QIO-SPI protocols). If we want to use the Vpp voltage with Quad I/O modify instructions, we must set previously this bit to 0 (his default value is 1, in this case the Vpp pin functionality is disabled in all Quad I/O operations: both in Extended SPI and QIO-SPI protocols). If the Volatile Enhanced Configuration Register bit 3 is set to 0, using the QIO-SPI protocol, after a Quad Command Page Program instruction or an Erase instruction is received (with all input data in the Program case) and the memory is de-selected, the protocol temporarily switches to Extended SPI protocol until Vpp passes from Vpph to normal I/O value (this transition is mandatory to come back to QIO-SPI protocol), to enable the possibility to perform polling instructions (to check if the internal modify cycle is finished by means of the WIP bit of the Status Register or of the Program/Erase controller bit of the Flag Status register) or Program/Erase Suspend instruction even if the DQ2 pin is temporarily used in his Vpp functionality. If the Volatile Enhanced Configuration Register bit 3 is set to 0, after any quad modify instruction (both in Extended SPI protocol and QIO-SPI protocol) there is a maximum allowed time-out of 200ms after the last instruction input is received and the memory is deselected to raise the Vpp signal to Vpph, otherwise the modify instruction start at normal speed, without the Vpph enhancement, and a flag error appears on Flag Status Register bit 3. 6.4.5 Output Driver Strength VECR The bits from 2 to 0 of the VECR set the value of the output driver strength, enabling to optimize the impedance at Vcc/2 output voltage for the specific application as described in Table 6.: Volatile Enhanced Configuration Register. The default values of Output Driver Strength is set by the dedicated bits of the Non Volatile Configuration Register (NVCR), the parts are delivered with the output impedance at Vcc/2 equal to 30 Ohms. 43/180 Volatile and Non Volatile Registers N25Q128 - 3 V 6.5 Flag Status Register The Flag Status Register is a powerful tool to investigate the status of the device, checking information regarding what is actually doing the memory and detecting possible error conditions. The Flag status register is composed by 8 bit.Three bits (Program/Erase Controller bit, Erase Suspend bit and Program Suspend bit) are a “Status Indicator bit”, they are set and reset automatically by the memory. Four bits (Erase error bit, Program error bit, VPP 1 to 0 error bit and Protection error bit) are “Error Indicators bits”, they are set by the memory when some program or erase operation fails or the user tries to perform a forbidden operation. The user can clear the Error Indicators bits by mean of the Clear Flag Status Register (CLFSR) instruction. All the Flag Status Register bits can be read by mean of the Read Status Register (RFSR) instruction. 44/180 N25Q128 - 3 V Volatile and Non Volatile Registers Table 7. BIT 7 6 5 4 3 2 1 0 Flag Status Register Description P/E Controller (not WIP) Erase Suspend Erase Program VPP Program Suspend Protection RESERVED Status Status Error Error Error Status Error Note 6.5.1 P/E Controller Status bit The bit 7 of the Flag Status register represents the Program/Erase Controller Status bit, It indicates whether there is a Program/Erase internal cycle active. When P/E Controller Status bit is Low (FSR=0) the device is busy; when the bit is High (FSR=1) the device is ready to process a new command. This bit has the same meaning of Write In Progress (WIP) bit of the standard SPI Status Register, but with opposite logic: FSR = not WIP It's possible to make the polling instructions, to check if the internal modify operations are finished, both on the Flag Status register bit 7 or on WIP bit of the Status Register. 6.5.2 Erase Suspend Status bit The bit 6 of the Flag Status register represents the Erase Suspend Status bit, It indicates that an Erase operation has been suspended or is going to be suspended. The bit is set (FSR=1) within the Erase Suspend Latency time, that is as soon as the Program/Erase Suspend command (PES) has been issued, therefore the device may still complete the operation before entering the Suspend Mode. The Erase Suspend Status should be considered valid when the P/E Controller bit is high (FSR=1). When a Program/Erase Resume command (PER) is issued the Erase Suspend Status bit returns Low (FSR=0) 6.5.3 Erase Status bit The bit 5 of the Flag Status Register represents the Erase Status bit. It indicates an erase failure or a protection error when an erase operation is issued. When the Erase Status bit is High (FSR=1) after an Erase failure that means that the P/E Controller has applied the maximum pulses number to the portion to be erased and still failed to verify that it has correctly erased. The Erase Status bit should be read once the P/E Controller Status bit is High. 45/180 Volatile and Non Volatile Registers N25Q128 - 3 V The Erase Status bit is related to all possible erase operations: Sector Erase, Sub Sector Erase, and Bulk Erase in all the three available protocols (SPI, DIO-SPI and QIO-SPI). Once the bit 5 is set High, it can only be reset Low (FSR=0) by a Clear Flag Status Register command (CLFSR). If set High it should be reset before a new Erase command is issued; otherwise the new command will appear to fail. 6.5.4 Program Status bit The bit 4 of the Flag Status Register represents the Program Status bit. It indicates: a Program failure an attempt to program a '1' on '0' when VPP=VPPH (only when the pattern is a multiple of 64 bits, otherwise this bit is "Don't care"). a protection error when a program is issued When the Program Status bit is High (FSR=1) after a Program failure that means that the P/E Controller has applied the maximum pulses number to the bytes and it still failed to verify that the required data have been correctly programmed. After an attempt to program '1' on '0', the FSR only goes High (FSR=1) if VPP=VPPH and the data pattern is a multiple of 64 bits: if VPP is not VPPH, FSR remains Low and the attempt is not shown while if VPP is equal to VPPh but the pattern is not a 64 bits multiple the bit 4 is Don't Care. The Program Status bit should be read once the P/E Controller Status bit is High. The Program Status bit is related to all possible program operations in the Extended SPI protocol: Page Program, Dual and Quad Input Fast Program, Dual and Quad Input Extended Fast Program, and OTP Program. The Program Status bit is related to the following program operations in the DIO-SPI and QIO-SPI protocols: Dual and Quad Command Page program and OTP program. Once the bit is set High, it can only be reset Low (FSR=0) by a Clear Flag Status Register command (CLFSR). If set High it should be reset before a new Program command is issued, otherwise the new command will appear to fail. 6.5.5 VPP Status bit The bit 3 of the Flag Status Register represents the VPP Status bit. It indicates an invalid voltage on the VPP pin during Program and Erase operations. The VPP pin is sampled at the beginning of a Program or Erase operation. If VPP becomes invalid during an operation, that is the voltage on VPP pin is below the VPPH Voltage (9V), the VPP Status bit goes High (FSR=1) and indeterminate results can occur. Once set High, the VPP Status bit can only be reset Low (FSR=0) by a Clear Flag Status Register command (CLFSR). If set High it should be reset before a new Program or Erase command is issued, otherwise the new command will appear to fail. 6.5.6 Program Suspend Status bit The bit 2 of the Flag Status register represents the Program Suspend Status bit, It indicates that an Program operation has been suspended or is going to be suspended. 46/180 N25Q128 - 3 V Volatile and Non Volatile Registers The bit is set (FSR=1) within the Erase Suspend Latency time, that is as soon as the Program/Erase Suspend command (PES) has been issued, therefore the device may still complete the operation before entering the Suspend Mode. The Program Suspend Status should be considered valid when the P/E Controller bit is high (FSR=1). When a Program/Erase Resume command (PER) is issued the Program Suspend Status bit returns Low (FSR=0) 6.5.7 Protection Status bit The bit 1 of the Flag Status Register represents the Protection Status bit. It indicates that an Erase or Program operation has tried to modify the contents of a protected array sector, or that a modify operation has tried to access to a locked OTP space. The Protection Status bit is related to all possible protection violations as follows: The sector is protected by Software Protection Mode 1 (SPM1) Lock registers, The sector is protected by Software Protection Mode 2 (SPM2) Block Protect Bits (standard SPI Status Register), An attempt to program OTP when locked, A Write Status Register command (WRSR) on STD SPI Status Register when locked by the SRWD bit in conjunction with the Write Protect (W/VPP) signal (Hardware Protection Mode). Once set High, the Protection Status bit can only be reset Low (FSR=0) by a Clear Flag Status Register command (CLFSR). If set High it should be reset before a new command is issued, otherwise the new command will appear to fail. 47/180 Protection modes N25Q128 - 3 V 7 Protection modes There are protocol-related and specific hardware and software protection modes. They are described below. 7.1 SPI Protocol-related protections This applies to all three protocols. The environments where non-volatile memory devices are used can be very noisy. No SPI device can operate correctly in the presence of excessive noise. To help combat this, the N25Q128 features the following data protection mechanisms: Power On Reset and an internal timer (tPUW) can provide protection against inadvertent changes while the power supply is outside the operating specification. Program, Erase, and Write Status Register instructions are checked to ensure the instruction includes a number of clock pulses that is a multiple of a byte before they are accepted for execution. All instructions that modify data must be preceded by a Write Enable (WREN) instruction to set the Write Enable Latch (WEL) bit. This bit is returned to its reset state by the following events (in Extended SPI protocol mode): – – – – – – – – – – – – – Power-up Write Disable (WRDI) instruction completion Write Status Register (WRSR) instruction completion Write to Lock Register (WRLR) instruction completion Program OTP (POTP) instruction completion Page Program (PP) instruction completion Dual Input Fast Program (DIFP) instruction completion Dual Input Extended Fast Program (DIEFP) instruction completion Quad Input Fast Program (QIFP) instruction completion Quad Input Extended Fast Program (QIEFP) instruction completion Subsector Erase (SSE) instruction completion Sector Erase (SE) instruction completion Bulk Erase (BE) instruction completion This bit is also returned to its reset state after all the analogous events in DIO-SPI and QIOSPI protocol modes. 7.2 Specific hardware and software protection There are two software protected modes, SPM1 and SPM2, that can be combined to protect the memory array as required. The SPM2 can be locked by hardware with the help of the W input pin. SPM1 The first software protected mode (SPM1) is managed by specific Lock Registers assigned to each 64 Kbyte sector. 48/180 N25Q128 - 3 V Protection modes The Lock Registers can be read and written using the Read Lock Register (RDLR) and Write to Lock Register (WRLR) instructions. In each Lock Register two bits control the protection of each sector: the Write Lock bit and the Lock Down bit. Write Lock bit: The Write Lock bit determines whether the contents of the sector can be modified (using the Write, Program, or Erase instructions). When the Write Lock bit is set to '1', the sector is write protected - any operations that attempt to change the data in the sector will fail. When the Write Lock bit is reset to '0', the sector is not write protected by the Lock Register, and may be modified. Lock Down bit: The Lock Down bit provides a mechanism for protecting software data from simple hacking and malicious attack. When the Lock Down bit is set to '1', further modification to the Write Lock and Lock Down bits cannot be performed. A powerup is required before changes to these bits can be made. When the Lock Down bit is reset to '0', the Write Lock and Lock Down bits can be changed. The definition of the Lock Register bits is given in Table 9: Lock Register out. SPM2 The second software protected mode (SPM2) uses the Block Protect bits (BP3, BP2, BP1, BP0) and the Top/Bottom bit (TB bit) to allow part of the memory to be configured as readonly. See Section 16: Ordering information. Table 8. Software protection truth table (Sectors 0 to 255, 64 Kbyte granularity) Protection Status Lock Down bit 0 0 1 1 Write Lock bit 0 1 0 1 Sector unprotected from Program/Erase/Write operations, protection status reversible. Sector protected from Program/Erase/Write operations, protection status reversible. Sector unprotected from Program/Erase/Write operations. Sector protection status cannot be changed except by a power-up. Sector protected from Program/Erase/Write operations. Sector protection status cannot be changed except by a power-up. Sector Lock Register As a second level of protection, the Write Protect signal (applied on the W/VPP pin) can freeze the Status Register in a read-only mode. In this mode, the Block Protect bits (BP3, BP2, BP1, BP0) and the Status Register Write Disable bit (SRWD) are protected. 49/180 Protection modes N25Q128 - 3 V Table 9. Protected area sizes (TB bit = 0) Status Register Content Memory Content Protected Area None Upper 256th (1/2 Mbit, sector 255) Upper 128th (1 Mbit, 2 sectors: 254 to 255) Upper 64th (2 Mbit, 4 sectors: 252 to 255) Upper 32nd (4 Mbit, 8 sectors: 248 to 255) Upper 16th (8 Mbit, 16 sectors: 240 to 255) Unprotected Area All sectors (sectors 0 to 255) Sectors 0 to 254 Sectors 0 to 253 Sectors 0 to 251 Sectors 0 to 247 Sectors 0 to 239 TB bit BP3 Bit PB2 Bit BP1 Bit BP0 Bit 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 Upper 8th Sectors 0 to 223 (16 Mbit, 32 sectors: 224 to 255) Upper quarter Lower 3 quarters (sectors 0 to (32 Mbit, 64 sectors: 193 to 255) 191) Upper half (64 Mbit, 128 sectors: 128 to 255) All sectors (128 Mbit, 256 sectors) All sectors (128 Mbit, 256 sectors) All sectors (128 Mbit, 256 sectors) All sectors (128 Mbit, 256 sectors) All sectors (128 Mbit, 256 sectors) All sectors (128 Mbit, 256 sectors) All sectors (128 Mbit, 256 sectors) Lower half (sectors 0 to 127) 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 1 1 0 0 1 1 1 0 1 0 1 0 1 None None None None None None None 50/180 N25Q128 - 3 V Protection modes Table 10. Protected area sizes (TB bit = 1) Status Register Content Memory Content Protected Area None Lower 256th (1/2 Mbit, sector 0) Lower 128th (1 Mbit, 2 sectors: 0 to 1) Lower 64th (2 Mbit, 4 sectors: 0 to 3) Lower 32nd (4 Mbit, 8 sectors: 0 to 7) Lower 16th (8 Mbit, 16 sectors: 0 to 15) Lower 8th (16 Mbit, 32 sectors: 0 to 31) Lower quarter (32 Mbit, 64 sectors: 0 to 63) Lower half (64 Mbit, 128 sectors: 0 to 127) All sectors (128 Mbit, 256 sectors) All sectors (128 Mbit, 256 sectors) All sectors (128 Mbit, 256 sectors) All sectors (128 Mbit, 256 sectors) All sectors (128 Mbit, 256 sectors) All sectors (128 Mbit, 256 sectors) All sectors (128 Mbit, 256 sectors) Unprotected Area All sectors (sectors 0 to 255) Sectors 1 to 255 Sectors 2 to 255 Sectors 4 to 255 Sectors 8 to 255 Sectors 16 to 255 Sectors 33 to 255 Upper 3 quarters (sectors 64 to 255) Upper half (sectors 128 to 255) None None None None None None None TB bit BP3 Bit PB2 Bit BP1 Bit BP0 Bit 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 The N25Q128 is available in the following architecture versions: Bottom version, 64 KB uniform sectors plus 8 bottom boot sectors (each with 16 subsectors), Top version, 64 KB uniform sectors plus 8 top boot sectors (each with 16 subsectors) Uniform version, 64 KB uniform sectors without any boot sectors and subsectors. 51/180 Memory organization N25Q128 - 3 V 8 Memory organization The memory is organized as: 16,777,216 bytes (8 bits each) 256 sectors (64 Kbytes each) In Bottom and Top versions: 8 bottom (top) 64 Kbytes boot sectors with 16 subsectors (4 Kbytes) and 248 standard 64 KB sectors 65,536 pages (256 bytes each) 64 OTP bytes located outside the main memory array Each page can be individually programmed (bits are programmed from 1 to 0). The device is Sector or Bulk Erasable (bits are erased from 0 to 1) but not Page Erasable, Subsector Erase is allowed on the 8 boot sectors (for devices with bottom or top architecture). Figure 9. HOLD W/VPP S C DQ0 DQ1 DQ2 DQ3 Control Logic Block diagram High Voltage Generator 64 OTP bytes I/O Shift Register Address Register and Counter 256 Byte Data Buffer Status Register FFFFFFh Y Decoder 00000h 256 bytes (page size) X Decoder 000FFh AI13722a 52/180 N25Q128 - 3 V Memory organization Table 11. Sector 255 254 253 252 251 250 249 248 247 246 245 244 243 242 241 240 239 238 237 236 235 234 233 232 231 230 229 228 227 226 225 224 223 222 Memory organization (uniform) (page 1 of 8) Address range FF0000 FE0000 FD0000 FC0000 FB0000 FA0000 F90000 F80000 F70000 F60000 F50000 F40000 F30000 F20000 F10000 F00000 EF0000 EE0000 ED0000 EC0000 EB0000 EA0000 E90000 E80000 E70000 E60000 E50000 E40000 E30000 E20000 E10000 E00000 DF0000 DE0000 FFFFFF FEFFFF FDFFFF FCFFFF FBFFFF FAFFFF F9FFFF F8FFFF F7FFFF F6FFFF F5FFFF F4FFFF F3FFFF F2FFFF F1FFFF F0FFFF EFFFFF EEFFFF EDFFFF ECFFFF EBFFFF EAFFFF E9FFFF E8FFFF E7FFFF E6FFFF E5FFFF E4FFFF E3FFFF E2FFFF E1FFFF E0FFFF DFFFFF DEFFFF 53/180 Memory organization Table 11. Sector 221 220 219 218 217 216 215 214 213 212 211 210 209 208 207 206 205 204 203 202 201 200 199 198 197 196 195 194 193 192 191 190 189 188 187 N25Q128 - 3 V Memory organization (uniform) (page 2 of 8) Address range DD0000 DC0000 DB0000 DA0000 D90000 D80000 D70000 D60000 D50000 D40000 D30000 D20000 D10000 D00000 CF0000 CE0000 CD0000 CC0000 CB0000 CA0000 C90000 C80000 C70000 C60000 C50000 C40000 C30000 C20000 C10000 C00000 BF0000 BE0000 BD0000 BC0000 BB0000 DDFFFF DCFFFF DBFFFF DAFFFF D9FFFF D8FFFF D7FFFF D6FFFF D5FFFF D4FFFF D3FFFF D2FFFF D1FFFF D0FFFF CFFFFF CEFFFF CDFFFF CCFFFF CBFFFF CAFFFF C9FFFF C8FFFF C7FFFF C6FFFF C5FFFF C4FFFF C3FFFF C2FFFF C1FFFF C0FFFF BFFFFF BEFFFF BDFFFF BCFFFF BBFFFF 54/180 N25Q128 - 3 V Table 11. Sector 186 185 184 183 182 181 180 179 178 177 176 175 174 173 172 171 170 169 168 167 166 165 164 163 162 161 160 159 158 157 156 155 154 153 152 BA0000 B90000 B80000 B70000 B60000 B50000 B40000 B30000 B20000 B10000 B00000 AF0000 AE0000 AD0000 AC0000 AB0000 AA0000 A90000 A80000 A70000 A60000 A50000 A40000 A30000 A20000 A10000 A00000 9F0000 9E0000 9D0000 9C0000 9B0000 9A0000 990000 980000 Memory organization Memory organization (uniform) (page 3 of 8) Address range BAFFFF B9FFFF B8FFFF B7FFFF B6FFFF B5FFFF B4FFFF B3FFFF B2FFFF B1FFFF B0FFFF AFFFFF AEFFFF ADFFFF ACFFFF ABFFFF AAFFFF A9FFFF A8FFFF A7FFFF A6FFFF A5FFFF A4FFFF A3FFFF A2FFFF A1FFFF A0FFFF 9FFFFF 9EFFFF 9DFFFF 9CFFFF 9BFFFF 9AFFFF 99FFFF 98FFFF 55/180 Memory organization Table 11. Sector 151 150 149 148 147 146 145 144 143 142 141 140 139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120 119 118 117 970000 960000 950000 940000 930000 920000 910000 900000 8F0000 8E0000 8D0000 8C0000 8B0000 8A0000 890000 880000 870000 860000 850000 840000 830000 820000 810000 800000 7F0000 7E0000 7D0000 7C0000 7B0000 7A0000 790000 780000 770000 760000 750000 N25Q128 - 3 V Memory organization (uniform) (page 4 of 8) Address range 97FFFF 96FFFF 95FFFF 94FFFF 93FFFF 92FFFF 91FFFF 90FFFF 8FFFFF 8EFFFF 8DFFFF 8CFFFF 8BFFFF 8AFFFF 89FFFF 88FFFF 87FFFF 86FFFF 85FFFF 84FFFF 83FFFF 82FFFF 81FFFF 80FFFF 7FFFFF 7EFFFF 7DFFFF 7CFFFF 7BFFFF 7AFFFF 79FFFF 78FFFF 77FFFF 76FFFF 75FFFF 56/180 N25Q128 - 3 V Table 11. Sector 116 115 114 113 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 740000 730000 720000 710000 700000 6F0000 6E0000 6D0000 6C0000 6B0000 6A0000 690000 680000 670000 660000 650000 640000 630000 620000 610000 600000 5F0000 5E0000 5D0000 5C0000 5B0000 5A0000 590000 580000 570000 560000 550000 540000 530000 520000 Memory organization Memory organization (uniform) (page 5 of 8) Address range 74FFFF 73FFFF 72FFFF 71FFFF 70FFFF 6FFFFF 6EFFFF 6DFFFF 6CFFFF 6BFFFF 6AFFFF 69FFFF 68FFFF 67FFFF 66FFFF 65FFFF 64FFFF 63FFFF 62FFFF 61FFFF 60FFFF 5FFFFF 5EFFFF 5DFFFF 5CFFFF 5BFFFF 5AFFFF 59FFFF 58FFFF 57FFFF 56FFFF 55FFFF 54FFFF 53FFFF 52FFFF 57/180 Memory organization Table 11. Sector 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 510000 500000 4F0000 4E0000 4D0000 4C0000 4B0000 4A0000 490000 480000 470000 460000 450000 440000 430000 420000 410000 400000 3F0000 3E0000 3D0000 3C0000 3B0000 3A0000 390000 380000 370000 360000 350000 340000 330000 320000 310000 300000 2F0000 N25Q128 - 3 V Memory organization (uniform) (page 6 of 8) Address range 51FFFF 50FFFF 4FFFFF 4EFFFF 4DFFFF 4CFFFF 4BFFFF 4AFFFF 49FFFF 48FFFF 47FFFF 46FFFF 45FFFF 44FFFF 43FFFF 42FFFF 41FFFF 40FFFF 3FFFFF 3EFFFF 3DFFFF 3CFFFF 3BFFFF 3AFFFF 39FFFF 38FFFF 37FFFF 36FFFF 35FFFF 34FFFF 33FFFF 32FFFF 31FFFF 30FFFF 2FFFFF 58/180 N25Q128 - 3 V Table 11. Sector 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 2E0000 2D0000 2C0000 2B0000 2A0000 290000 280000 270000 260000 250000 240000 230000 220000 210000 200000 1F0000 1E0000 1D0000 1C0000 1B0000 1A0000 190000 180000 170000 160000 150000 140000 130000 120000 110000 100000 F0000 E0000 D0000 C0000 Memory organization Memory organization (uniform) (page 7 of 8) Address range 2EFFFF 2DFFFF 2CFFFF 2BFFFF 2AFFFF 29FFFF 28FFFF 27FFFF 26FFFF 25FFFF 24FFFF 23FFFF 22FFFF 21FFFF 20FFFF 1FFFFF 1EFFFF 1DFFFF 1CFFFF 1BFFFF 1AFFFF 19FFFF 18FFFF 17FFFF 16FFFF 15FFFF 14FFFF 13FFFF 12FFFF 11FFFF 10FFFF FFFFF EFFFF DFFFF CFFFF 59/180 Memory organization Table 11. Sector 11 10 9 8 7 6 5 4 3 2 1 0 B0000 A0000 90000 80000 70000 60000 50000 40000 30000 20000 10000 0 N25Q128 - 3 V Memory organization (uniform) (page 8 of 8) Address range BFFFF AFFFF 9FFFF 8FFFF 7FFFF 6FFFF 5FFFF 4FFFF 3FFFF 2FFFF 1FFFF FFFF Table 12. Sector 255 254 253 252 251 250 249 248 247 246 245 244 243 242 241 240 239 238 237 236 - Memory organization (bottom) (page 1 of 9) Subsector FF0000 FE0000 FD0000 FC0000 FB0000 FA0000 F90000 F80000 F70000 F60000 F50000 F40000 F30000 F20000 F10000 F00000 EF0000 EE0000 ED0000 EC0000 Address range FFFFFF FEFFFF FDFFFF FCFFFF FBFFFF FAFFFF F9FFFF F8FFFF F7FFFF F6FFFF F5FFFF F4FFFF F3FFFF F2FFFF F1FFFF F0FFFF EFFFFF EEFFFF EDFFFF ECFFFF 60/180 N25Q128 - 3 V Table 12. Sector 235 234 233 232 231 230 229 228 227 226 225 224 223 222 221 220 219 218 217 216 215 214 213 212 211 210 209 208 207 206 205 204 203 202 201 - Memory organization Memory organization (bottom) (page 2 of 9) Subsector EB0000 EA0000 E90000 E80000 E70000 E60000 E50000 E40000 E30000 E20000 E10000 E00000 DF0000 DE0000 DD0000 DC0000 DB0000 DA0000 D90000 D80000 D70000 D60000 D50000 D40000 D30000 D20000 D10000 D00000 CF0000 CE0000 CD0000 CC0000 CB0000 CA0000 C90000 Address range EBFFFF EAFFFF E9FFFF E8FFFF E7FFFF E6FFFF E5FFFF E4FFFF E3FFFF E2FFFF E1FFFF E0FFFF DFFFFF DEFFFF DDFFFF DCFFFF DBFFFF DAFFFF D9FFFF D8FFFF D7FFFF D6FFFF D5FFFF D4FFFF D3FFFF D2FFFF D1FFFF D0FFFF CFFFFF CEFFFF CDFFFF CCFFFF CBFFFF CAFFFF C9FFFF 61/180 Memory organization Table 12. Sector 200 199 198 197 196 195 194 193 192 191 190 189 188 187 186 185 184 183 182 181 180 179 178 177 176 175 174 173 172 171 170 169 168 167 166 - N25Q128 - 3 V Memory organization (bottom) (page 3 of 9) Subsector C80000 C70000 C60000 C50000 C40000 C30000 C20000 C10000 C00000 BF0000 BE0000 BD0000 BC0000 BB0000 BA0000 B90000 B80000 B70000 B60000 B50000 B40000 B30000 B20000 B10000 B00000 AF0000 AE0000 AD0000 AC0000 AB0000 AA0000 A90000 A80000 A70000 A60000 Address range C8FFFF C7FFFF C6FFFF C5FFFF C4FFFF C3FFFF C2FFFF C1FFFF C0FFFF BFFFFF BEFFFF BDFFFF BCFFFF BBFFFF BAFFFF B9FFFF B8FFFF B7FFFF B6FFFF B5FFFF B4FFFF B3FFFF B2FFFF B1FFFF B0FFFF AFFFFF AEFFFF ADFFFF ACFFFF ABFFFF AAFFFF A9FFFF A8FFFF A7FFFF A6FFFF 62/180 N25Q128 - 3 V Table 12. Sector 165 164 163 162 161 160 159 158 157 156 155 154 153 152 151 150 149 148 147 146 145 144 143 142 141 140 139 138 137 136 135 134 133 132 131 - Memory organization Memory organization (bottom) (page 4 of 9) Subsector A50000 A40000 A30000 A20000 A10000 A00000 9F0000 9E0000 9D0000 9C0000 9B0000 9A0000 990000 980000 970000 960000 950000 940000 930000 920000 910000 900000 8F0000 8E0000 8D0000 8C0000 8B0000 8A0000 890000 880000 870000 860000 850000 840000 830000 Address range A5FFFF A4FFFF A3FFFF A2FFFF A1FFFF A0FFFF 9FFFFF 9EFFFF 9DFFFF 9CFFFF 9BFFFF 9AFFFF 99FFFF 98FFFF 97FFFF 96FFFF 95FFFF 94FFFF 93FFFF 92FFFF 91FFFF 90FFFF 8FFFFF 8EFFFF 8DFFFF 8CFFFF 8BFFFF 8AFFFF 89FFFF 88FFFF 87FFFF 86FFFF 85FFFF 84FFFF 83FFFF 63/180 Memory organization Table 12. Sector 130 129 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 - N25Q128 - 3 V Memory organization (bottom) (page 5 of 9) Subsector 820000 810000 800000 7F0000 7E0000 7D0000 7C0000 7B0000 7A0000 790000 780000 770000 760000 750000 740000 730000 720000 710000 700000 6F0000 6E0000 6D0000 6C0000 6B0000 6A0000 690000 680000 670000 660000 650000 640000 630000 620000 610000 600000 Address range 82FFFF 81FFFF 80FFFF 7FFFFF 7EFFFF 7DFFFF 7CFFFF 7BFFFF 7AFFFF 79FFFF 78FFFF 77FFFF 76FFFF 75FFFF 74FFFF 73FFFF 72FFFF 71FFFF 70FFFF 6FFFFF 6EFFFF 6DFFFF 6CFFFF 6BFFFF 6AFFFF 69FFFF 68FFFF 67FFFF 66FFFF 65FFFF 64FFFF 63FFFF 62FFFF 61FFFF 60FFFF 64/180 N25Q128 - 3 V Table 12. Sector 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 - Memory organization Memory organization (bottom) (page 6 of 9) Subsector 5F0000 5E0000 5D0000 5C0000 5B0000 5A0000 590000 580000 570000 560000 550000 540000 530000 520000 510000 500000 4F0000 4E0000 4D0000 4C0000 4B0000 4A0000 490000 480000 470000 460000 450000 440000 430000 420000 410000 400000 3F0000 3E0000 3D0000 Address range 5FFFFF 5EFFFF 5DFFFF 5CFFFF 5BFFFF 5AFFFF 59FFFF 58FFFF 57FFFF 56FFFF 55FFFF 54FFFF 53FFFF 52FFFF 51FFFF 50FFFF 4FFFFF 4EFFFF 4DFFFF 4CFFFF 4BFFFF 4AFFFF 49FFFF 48FFFF 47FFFF 46FFFF 45FFFF 44FFFF 43FFFF 42FFFF 41FFFF 40FFFF 3FFFFF 3EFFFF 3DFFFF 65/180 Memory organization Table 12. Sector 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 - N25Q128 - 3 V Memory organization (bottom) (page 7 of 9) Subsector 3C0000 3B0000 3A0000 390000 380000 370000 360000 350000 340000 330000 320000 310000 300000 2F0000 2E0000 2D0000 2C0000 2B0000 2A0000 290000 280000 270000 260000 250000 240000 230000 220000 210000 200000 1F0000 1E0000 1D0000 1C0000 1B0000 1A0000 Address range 3CFFFF 3BFFFF 3AFFFF 39FFFF 38FFFF 37FFFF 36FFFF 35FFFF 34FFFF 33FFFF 32FFFF 31FFFF 30FFFF 2FFFFF 2EFFFF 2DFFFF 2CFFFF 2BFFFF 2AFFFF 29FFFF 28FFFF 27FFFF 26FFFF 25FFFF 24FFFF 23FFFF 22FFFF 21FFFF 20FFFF 1FFFFF 1EFFFF 1DFFFF 1CFFFF 1BFFFF 1AFFFF 66/180 N25Q128 - 3 V Table 12. Sector 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 127 7 112 111 6 96 95 5 80 79 4 64 63 3 48 47 2 32 ... ... ... ... ... ... Memory organization Memory organization (bottom) (page 8 of 9) Subsector 190000 180000 170000 160000 150000 140000 130000 120000 110000 100000 F0000 E0000 D0000 C0000 B0000 A0000 90000 80000 7F000 ... Address range 19FFFF 18FFFF 17FFFF 16FFFF 15FFFF 14FFFF 13FFFF 12FFFF 11FFFF 10FFFF FFFFF EFFFF DFFFF CFFFF BFFFF AFFFF 9FFFF 8FFFF 7FFFF ... 70FFF 6FFFF ... ... 60FFF 5FFFF ... ... 50FFF 4FFFF ... ... 40FFF 3FFFF ... ... 30FFF 2FFFF ... ... 20FFF 70000 6F000 60000 5F000 50000 4F000 40000 3F000 30000 2F000 20000 67/180 Memory organization Table 12. Sector 31 1 16 15 0 0 ... ... N25Q128 - 3 V Memory organization (bottom) (page 9 of 9) Subsector 1F000 ... Address range 1FFFF ... 10FFF FFFF ... ... FFF FFFFFF ... FF0FFF FEFFFF ... FE0FFF FDFFFF ... FD0FFF FCFFFF ... FC0FFF FBFFFF ... FB0FFF FAFFFF ... FA0FFF F9FFFF ... F90FFF F8FFFF ... F80FFF F7FFFF F6FFFF F5FFFF 10000 F000 0 Table 13. Sector Memory organization (top) Subsector 127 FFF000 ... ... FF0000 FEF000 ... ... FE0000 FDF000 ... ... FD0000 FCF000 ... ... FC0000 FBF000 ... ... FB0000 FAF000 ... ... FA0000 F9F000 ... ... F90000 F8F000 ... ... F80000 F70000 F60000 F50000 Address range 255 112 111 254 96 95 253 80 79 252 64 63 251 48 47 250 32 31 249 16 15 248 0 247 246 245 - 68/180 N25Q128 - 3 V Table 13. Sector 244 243 242 241 240 239 238 237 236 235 234 233 232 231 230 229 228 227 226 225 224 223 222 221 220 219 218 217 216 215 214 213 212 211 210 - Memory organization Memory organization (top) Subsector F40000 F30000 F20000 F10000 F00000 EF0000 EE0000 ED0000 EC0000 EB0000 EA0000 E90000 E80000 E70000 E60000 E50000 E40000 E30000 E20000 E10000 E00000 DF0000 DE0000 DD0000 DC0000 DB0000 DA0000 D90000 D80000 D70000 D60000 D50000 D40000 D30000 D20000 Address range F4FFFF F3FFFF F2FFFF F1FFFF F0FFFF EFFFFF EEFFFF EDFFFF ECFFFF EBFFFF EAFFFF E9FFFF E8FFFF E7FFFF E6FFFF E5FFFF E4FFFF E3FFFF E2FFFF E1FFFF E0FFFF DFFFFF DEFFFF DDFFFF DCFFFF DBFFFF DAFFFF D9FFFF D8FFFF D7FFFF D6FFFF D5FFFF D4FFFF D3FFFF D2FFFF 69/180 Memory organization Table 13. Sector 209 208 207 206 205 204 203 202 201 200 199 198 197 196 195 194 193 192 191 190 189 188 187 186 185 184 183 182 181 180 179 178 177 176 175 - N25Q128 - 3 V Memory organization (top) Subsector D10000 D00000 CF0000 CE0000 CD0000 CC0000 CB0000 CA0000 C90000 C80000 C70000 C60000 C50000 C40000 C30000 C20000 C10000 C00000 BF0000 BE0000 BD0000 BC0000 BB0000 BA0000 B90000 B80000 B70000 B60000 B50000 B40000 B30000 B20000 B10000 B00000 AF0000 Address range D1FFFF D0FFFF CFFFFF CEFFFF CDFFFF CCFFFF CBFFFF CAFFFF C9FFFF C8FFFF C7FFFF C6FFFF C5FFFF C4FFFF C3FFFF C2FFFF C1FFFF C0FFFF BFFFFF BEFFFF BDFFFF BCFFFF BBFFFF BAFFFF B9FFFF B8FFFF B7FFFF B6FFFF B5FFFF B4FFFF B3FFFF B2FFFF B1FFFF B0FFFF AFFFFF 70/180 N25Q128 - 3 V Table 13. Sector 174 173 172 171 170 169 168 167 166 165 164 163 162 161 160 159 158 157 156 155 154 153 152 151 150 149 148 147 146 145 144 143 142 141 140 - Memory organization Memory organization (top) Subsector AE0000 AD0000 AC0000 AB0000 AA0000 A90000 A80000 A70000 A60000 A50000 A40000 A30000 A20000 A10000 A00000 9F0000 9E0000 9D0000 9C0000 9B0000 9A0000 990000 980000 970000 960000 950000 940000 930000 920000 910000 900000 8F0000 8E0000 8D0000 8C0000 Address range AEFFFF ADFFFF ACFFFF ABFFFF AAFFFF A9FFFF A8FFFF A7FFFF A6FFFF A5FFFF A4FFFF A3FFFF A2FFFF A1FFFF A0FFFF 9FFFFF 9EFFFF 9DFFFF 9CFFFF 9BFFFF 9AFFFF 99FFFF 98FFFF 97FFFF 96FFFF 95FFFF 94FFFF 93FFFF 92FFFF 91FFFF 90FFFF 8FFFFF 8EFFFF 8DFFFF 8CFFFF 71/180 Memory organization Table 13. Sector 139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 - N25Q128 - 3 V Memory organization (top) Subsector 8B0000 8A0000 890000 880000 870000 860000 850000 840000 830000 820000 810000 800000 7F0000 7E0000 7D0000 7C0000 7B0000 7A0000 790000 780000 770000 760000 750000 740000 730000 720000 710000 700000 6F0000 6E0000 6D0000 6C0000 6B0000 6A0000 690000 Address range 8BFFFF 8AFFFF 89FFFF 88FFFF 87FFFF 86FFFF 85FFFF 84FFFF 83FFFF 82FFFF 81FFFF 80FFFF 7FFFFF 7EFFFF 7DFFFF 7CFFFF 7BFFFF 7AFFFF 79FFFF 78FFFF 77FFFF 76FFFF 75FFFF 74FFFF 73FFFF 72FFFF 71FFFF 70FFFF 6FFFFF 6EFFFF 6DFFFF 6CFFFF 6BFFFF 6AFFFF 69FFFF 72/180 N25Q128 - 3 V Table 13. Sector 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 - Memory organization Memory organization (top) Subsector 680000 670000 660000 650000 640000 630000 620000 610000 600000 5F0000 5E0000 5D0000 5C0000 5B0000 5A0000 590000 580000 570000 560000 550000 540000 530000 520000 510000 500000 4F0000 4E0000 4D0000 4C0000 4B0000 4A0000 490000 480000 470000 460000 Address range 68FFFF 67FFFF 66FFFF 65FFFF 64FFFF 63FFFF 62FFFF 61FFFF 60FFFF 5FFFFF 5EFFFF 5DFFFF 5CFFFF 5BFFFF 5AFFFF 59FFFF 58FFFF 57FFFF 56FFFF 55FFFF 54FFFF 53FFFF 52FFFF 51FFFF 50FFFF 4FFFFF 4EFFFF 4DFFFF 4CFFFF 4BFFFF 4AFFFF 49FFFF 48FFFF 47FFFF 46FFFF 73/180 Memory organization Table 13. Sector 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 - N25Q128 - 3 V Memory organization (top) Subsector 450000 440000 430000 420000 410000 400000 3F0000 3E0000 3D0000 3C0000 3B0000 3A0000 390000 380000 370000 360000 350000 340000 330000 320000 310000 300000 2F0000 2E0000 2D0000 2C0000 2B0000 2A0000 290000 280000 270000 260000 250000 240000 230000 Address range 45FFFF 44FFFF 43FFFF 42FFFF 41FFFF 40FFFF 3FFFFF 3EFFFF 3DFFFF 3CFFFF 3BFFFF 3AFFFF 39FFFF 38FFFF 37FFFF 36FFFF 35FFFF 34FFFF 33FFFF 32FFFF 31FFFF 30FFFF 2FFFFF 2EFFFF 2DFFFF 2CFFFF 2BFFFF 2AFFFF 29FFFF 28FFFF 27FFFF 26FFFF 25FFFF 24FFFF 23FFFF 74/180 N25Q128 - 3 V Table 13. Sector 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - Memory organization Memory organization (top) Subsector 220000 210000 200000 1F0000 1E0000 1D0000 1C0000 1B0000 1A0000 190000 180000 170000 160000 150000 140000 130000 120000 110000 100000 F0000 E0000 D0000 C0000 B0000 A0000 90000 80000 70000 60000 50000 40000 30000 20000 10000 0 Address range 22FFFF 21FFFF 20FFFF 1FFFFF 1EFFFF 1DFFFF 1CFFFF 1BFFFF 1AFFFF 19FFFF 18FFFF 17FFFF 16FFFF 15FFFF 14FFFF 13FFFF 12FFFF 11FFFF 10FFFF FFFFF EFFFF DFFFF CFFFF BFFFF AFFFF 9FFFF 8FFFF 7FFFF 6FFFF 5FFFF 4FFFF 3FFFF 2FFFF 1FFFF FFFF 75/180 Instructions N25Q128 - 3 V 9 Instructions The device can work in three different protocols: Extended SPI, DIO-SPI and QIO-SPI. Each protocol has a dedicated instruction set, and each instruction set features the same functionality: Read, program and erase the memory and the 64 byte OTP area, Suspend and resume the program or erase operations, Read and modify all the registers and to read the device ID: please note that in this case there is a small functionality difference among the single and the multiple I/O read ID instructions. See Section 9.2.1: Multiple I/O Read Identification protocol and Section 9.3.1: Multiple I/O Read Identification (MIORDID). The application can choose in every time of the device life which protocol to use by setting the dedicated bits either in the Non Volatile Configuration Register or the Volatile Enhanced Configuration Register. Note: In multiple SPI protocols, all instructions, addresses, and data are parallel on two lines (DIOSPI protocol) or four lines (QIO-SPI protocol). All instructions, addresses and data are shifted in and out of the device, most significant bit first. Serial Data input(s) is (are) sampled on the first rising edge of Serial Clock (C) after Chip Select (S) is driven Low. Then, the one-byte instruction code must be shifted in to the device, most significant bit first, on Serial Data input(s), each bit being latched on the rising edges of Serial Clock (C). Instruction code is shifted into the device just on DQ0 in Extended SPI protocol, on DQ0 and DQ1 in DIO-SPI protocol and on DQ0, DQ1, DQ2, and DQ3 in QIO-SPI protocol. In standard mode every instruction sequence starts with a one-byte instruction code. Depending on the instruction, this might be followed by address bytes, or by data bytes, or by both or none. In XIP modes only read operation and exit XIP mode can be performed, and to read the memory content no instructions code are needed: the device directly receives addresses and after a configurable number of dummy clock cycle it outputs the required data. 9.1 Extended SPI Instructions In Extended SPI protocol instruction set the instruction code is always shifted into the device just on DQ0 pin, while depending on the instruction addresses and input/output data can run on single, two or four wires. In the case of a Read Instructions Data Bytes (READ), Read Data Bytes at Higher Speed (FAST_READ), Dual Output Fast Read (DOFR), Dual Input/Output Fast Read (DIOFR), Quad Output Fast Read (QOFR), Quad Input/Output Fast Read (QIOFR), Read OTP (ROTP), Read Lock Registers (RDLR), Read Status Register (RDSR), Read Flag Status Register (RFSR), Read NV Configuration Register (RDNVCR), Read Volatile Configuration Register (RDVCR), Read Volatile Enhanced Configuration Register (RDVECR) and Read Identification (RDID) instruction, the shifted-in instruction sequence is followed by a data-out sequence. Chip Select (S) can be driven High after any bit of the data-out sequence is being shifted out. 76/180 N25Q128 - 3 V Instructions In the case of a Page Program (PP), Program OTP (POTP), Dual Input Fast Program (DIFP), Dual Input Extended Fast Program (DIEFP), Quad Input Fast Program (QIFP), Quad Input Extended Fast Program (QIEFP), Subsector Erase (SSE), Sector Erase (SE), Bulk Erase (BE), Write Status Register (WRSR), Clear Flag Status Register (CLFSR), Write to Lock Register (WRLR), Write Configuration Register (WRVCR), Write Enhanced Configuration Register (WRVECR), Write NV Configuration Register (WRNVCR), Write Enable (WREN) or Write Disable (WRDI) instruction, Chip Select (S) must be driven High exactly at a byte boundary, otherwise the instruction is rejected, and is not executed. That is, Chip Select (S) must driven High when the number of clock pulses after Chip Select (S) being driven Low is an exact multiple of eight. All attempts to access the memory array are ignored during: – – – – – – – – Write Status Register cycle Write Non Volatile Configuration Register Program cycle Erase cycle Internal Write Status Register cycle, Write Non Volatile Configuration Register, Program cycle, Erase cycle The following continue unaffected, with one exception: The only exception is the Program/Erase Suspend instruction (PES), that can be used to pause all the program and the erase cycles except for: – – – Program OTP (POTP), Bulk Erase, Write Non Volatile Configuration Register. The suspended program or erase cycle can be resumed by the Program/Erase Resume instruction (PER). During the program/erase cycles, the polling instructions (both on the Status register and on the Flag Status register) are also accepted to allow the application to check the end of the internal modify cycles. Note: These polling instructions don't affect the internal cycles performing. 77/180 Instructions N25Q128 - 3 V Table 14. Instruction set: extended SPI protocol (page 1 of 2) One-byte Instruction Code (BIN) 1001 111x 0000 0011 0000 1011 0011 1011 1011 1011 0110 1011 1110 1011 0100 1011 0000 0110 0000 0100 0000 0010 1010 0010 1101 0010 0011 0010 0001 0010 0100 0010 0010 0000 1101 1000 1100 0111 0111 1010 0111 0101 0000 0101 0000 0001 1110 1000 1110 0101 0111 0000 0101 0000 1011 0101 1011 0001 1000 0101 1000 0001 One-byte Dummy Instruction Address clock Code (HEX) bytes cycle 9Eh / 9Fh 03h 0Bh 3Bh BB 6Bh EBh 4Bh 06h 04h 02h A2h D2h 32h 12h 42h 20h D8h C7h 7Ah 75h 05h 01h E8h E5h 70h 50h B5h B1h 85h 81h 0 3 3 3 3 3 3 3 0 0 3 3 3 3 3 3 3 3 0 0 0 0 0 3 3 0 0 0 0 0 0 0 0 8 (1) Instruction Description Data bytes 1 to 20 1 to ∞ 1 to ∞ 1 to ∞ 1 to ∞ 1 to ∞ 1 to ∞ 1 to 65 0 0 1 to 256 1 to 256 1 to 256 1 to 256 1 to 256 1 to 65 0 0 0 0 0 1 to ∞ 1 1 to ∞ 1 1 to ∞ 0 2 2 1 to ∞ 1 RDID READ Read Identification Read Data Bytes FAST_READ Read Data Bytes at Higher Speed DOFR DIOFR QOFR QIOFR ROTP WREN WRDI PP DIFP DIEFP QIFP QIEFP POTP SSE (2) SE BE PER PES RDSR WRSR RDLR WRLR RFSR CLFSR RDNVCR WRNVCR RDVCR WRVCR Dual Output Fast Read Dual Input/Output Fast Read Quad Output Fast Read Quad Input/Output Fast Read Read OTP (Read of OTP area) Write Enable Write Disable Page Program Dual Input Fast Program Dual Input Extended Fast Program Quad Input Fast Program Quad Input Extended Fast Program Program OTP (Program of OTP area) SubSector Erase Sector Erase Bulk Erase Program/Erase Resume Program/Erase Suspend Read Status Register Write Status Register Read Lock Register Write to Lock Register Read Flag Status Register Clear Flag Status Register Read NV Configuration Register Write NV Configuration Register Read Volatile Configuration Register Write Volatile Configuration Register 8 (1) 8 (1) 8 (1) (1 10 8 (1) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 78/180 N25Q128 - 3 V Table 14. Instruction set: extended SPI protocol (page 2 of 2) One-byte Instruction Code (BIN) 0110 0101 0110 0001 Instructions Instruction Description One-byte Dummy Instruction Address clock Code (HEX) bytes cycle 65h 61h 0 0 0 0 Data bytes RDVECR WRVECR Read Volatile Enhanced Configuration Register Write Volatile Enhanced Configuration Register 1 to ∞ 1 1) The Number of dummy clock cycles is configurable by user 2) Subsector erase instruction is only available in Bottom or Top parts 9.1.1 Read Identification (RDID) The Read Identification (RDID) instruction allows to read the device identification data: – – – Manufacturer identification (1 byte) Device identification (2 bytes) A Unique ID code (UID) (17 bytes, of which 14 factory programmed upon customer request). The manufacturer identification is assigned by JEDEC, and has the value 20h. The device identification is assigned by the device manufacturer, and indicates the memory type in the first byte (BAh), and the memory capacity of the device in the second byte (18h). The UID is composed by 17 read only bytes, containing the length of the following data in the first byte (set to 10h), 2 bytes of Extended Device ID (EDID) to identify the specific device configuration (Top, Bottom or uniform architecture, Hold or Reset functionality), and 14 bytes of the optional Customized Factory Data (CFD) content. The CFD bytes can be factory programmed with customers data upon their demand. If the customers do not make requests, the devices are shipped with all the CFD bytes programmed to zero (00h). Any Read Identification (RDID) instruction while an Erase or Program cycle is in progress, is not decoded, and has no effect on the cycle that is in progress. The device is first selected by driving Chip Select (S) Low. Then, the 8-bit instruction code for the instruction is shifted in. After this, the 24-bit device identification, stored in the memory, the 17 bytes of UID content will be shifted out on Serial Data output (DQ1). Each bit is shifted out during the falling edge of Serial Clock (C). The instruction sequence is shown in Figure 10. The Read Identification (RDID) instruction is terminated by driving Chip Select (S) High at any time during data output. 79/180 Instructions N25Q128 - 3 V When Chip Select (S) is driven High, the device is put in the Standby Power mode. Once in the Standby Power mode, the device waits to be selected, so that it can receive, decode and execute instructions. Table 15. Read Identification data-out sequence Device identification Memory type 20h BAh Memory capacity 18h EDID+CFD length 10h UID EDID 2 bytes CFD 14 bytes Manufacturer Identification Table 16. Bit 7 Extended Device ID table (first byte) Bit 6 Bit 5 Bit 4 VCR XIP bit setting: 0 = required, 1 = not required Bit 3 Hold/Reset function: 0 = HOLD, 1 = Reset Bit 2 Addressing: 0 = by Byte, Bit 1 Bit 0 Reserved Reserved Reserved Architecture: 00 = Uniform, 01 = Bottom, 11 = Top Figure 10. Read identification instruction and data-out sequence S 0 C Instruction DQ0 Manufacturer identification High Impedance DQ1 MSB 15 14 13 MSB 3 2 1 0 MSB AI06809d 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 28 29 30 31 Device identification UID 9.1.2 Read Data Bytes (READ) The device is first selected by driving Chip Select (S) Low. The instruction code for the Read Data Bytes (READ) instruction is followed by a 3-byte address (A23-A0), each bit being latched-in during the rising edge of Serial Clock (C). Then the memory contents, at that address, is shifted out on Serial Data output (DQ1), each bit being shifted out, at a maximum frequency fR, during the falling edge of Serial Clock (C). The first byte addressed can be at any location. The address is automatically incremented to the next higher address after each byte of data is shifted out. The whole memory can, therefore, be read with a single Read Data Bytes (READ) instruction. When the highest address is reached, the address counter rolls over to 000000h, allowing the read sequence to be continued indefinitely. The Read Data Bytes (READ) instruction is terminated by driving Chip Select (S) High. Chip Select (S) can be driven High at any time during data output. Any Read Data Bytes (READ) 80/180 N25Q128 - 3 V Instructions instruction, while an Erase, Program or Write cycle is in progress, is rejected without having any effects on the cycle that is in progress. Figure 11. S 0 C Instruction 24-bit address (1) 1 2 3 4 5 6 7 8 9 10 28 29 30 31 32 33 34 35 36 37 38 39 Read Data Bytes instruction and data-out sequence DQ0 High Impedance DQ1 23 22 21 MSB 3 2 1 0 Data out 1 7 6 5 4 3 2 1 0 Data out 2 7 MSB AI13736b 9.1.3 Read Data Bytes at Higher Speed (FAST_READ) The device is first selected by driving Chip Select (S) Low. The instruction code for the Read Data Bytes at Higher Speed (FAST_READ) instruction is followed by a 3-byte address (A23A0) and a dummy byte, each bit being latched-in during the rising edge of Serial Clock (C). Then the memory contents, at that address, are shifted out on Serial Data output (DQ1) at a maximum frequency fC, during the falling edge of Serial Clock (C). The first byte addressed can be at any location. The address is automatically incremented to the next higher address after each byte of data is shifted out. The whole memory can, therefore, be read with a single Read Data Bytes at Higher Speed (FAST_READ) instruction. When the highest address is reached, the address counter rolls over to 000000h, allowing the read sequence to be continued indefinitely. The Read Data Bytes at Higher Speed (FAST_READ) instruction is terminated by driving Chip Select (S) High. Chip Select (S) can be driven High at any time during data output. Any Read Data Bytes at Higher Speed (FAST_READ) instruction, while an Erase, Program or Write cycle is in progress, is rejected without having any effects on the cycle that is in progress. 81/180 Instructions N25Q128 - 3 V Figure 12. Read Data Bytes at Higher Speed instruction and data-out sequence S 0 C Instruction 24-bit address 1 2 3 4 5 6 7 8 9 10 28 29 30 31 DQ0 High Impedance DQ1 23 22 21 3 2 1 0 S 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 C Dummy cycles DQ0 7 6 5 4 3 2 1 0 DATA OUT 1 DATA OUT 2 1 0 7 MSB 6 5 4 3 2 1 0 7 MSB Read_Data_Bytes_Fast_Speed DQ1 7 MSB 6 5 4 3 2 9.1.4 Dual Output Fast Read (DOFR) The Dual Output Fast Read (DOFR) instruction is very similar to the Read Data Bytes at Higher Speed (FAST_READ) instruction, except that the data are shifted out on two pins (pin DQ0 and pin DQ1) instead of only one. Outputting the data on two pins instead of one doubles the data transfer bandwidth compared to the Read Data Bytes at Higher Speed (FAST_READ) instruction. The device is first selected by driving Chip Select (S) Low. The instruction code for the Dual Output Fast Read instruction is followed by a 3-byte address (A23-A0) and a dummy byte, each bit being latched-in during the rising edge of Serial Clock (C). Then the memory contents, at that address, are shifted out on DQ0 and DQ1 at a maximum frequency Fc, during the falling edge of Serial Clock (C). The first byte addressed can be at any location. The address is automatically incremented to the next higher address after each byte of data is shifted out on DQ0 and DQ1. The whole memory can, therefore, be read with a single Dual Output Fast Read (DOFR) instruction. When the highest address is reached, the address counter rolls over to 00 0000h, so that the read sequence can be continued indefinitely. 82/180 N25Q128 - 3 V Figure 13. Dual Output Fast Read instruction sequence S Mode 3 C Mode 2 Instruction DQ0 24-bit address 23 22 21 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 28 29 30 31 Instructions DQ1 High Impedance S 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 C Dummy cycles DQ0 6 4 2 0 6 4 2 0 6 4 2 0 6 4 2 0 DATA OUT 1 DQ1 7 MSB 5 3 1 DATA OUT 2 7 MSB 5 3 1 DATA OUT 3 7 MSB 5 3 1 DATA OUT n 7 MSB 5 3 1 MSB Dual_Output_Data_Fast_Read 9.1.5 Dual I/O Fast Read The Dual I/O Fast Read (DIOFR) instruction is very similar to the Dual Output Fast Read (DOFR), except that the address bits are shifted in on two pins (pin DQ0 and pin DQ1) instead of only one. 83/180 Instructions Figure 14. Dual I/O Fast Read instruction sequence S Mode 3 C Mode 0 Instruction DQ0 6 4 2 0 6 4 2 0 6 4 2 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 N25Q128 - 3 V DQ1 7 5 3 1 7 5 3 1 7 5 3 1 Dummy Cycles Address S 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 C IO switches from Input to Output 6 DQ0 7 DQ1 Byte 1 Byte 2 Byte 3 Byte 4 5 3 1 7 5 3 1 7 5 3 1 7 5 3 1 7 4 2 0 6 4 2 0 6 4 2 0 6 4 2 0 6 Dual_IO_Fast_Read 9.1.6 Quad Output Fast Read The Quad Output Fast Read (QOFR) instruction is very similar to the Dual Output Fast Read (DOFR) instruction, except that the data are shifted out on four pins (pin DQ0, pin DQ1, pin W/VPP/DQ2 and pin HOLD/DQ3 (1) instead of only two. Outputting the data on four pins instead of one doubles the data transfer bandwidth compared to the Dual Output Fast Read (DOFR) instruction. The device is first selected by driving Chip Select (S) Low. The instruction code for the Quad Output Fast Read instruction is followed by a 3-byte address (A23-A0) and a dummy byte, each bit being latched-in during the rising edge of Serial Clock (C). Then the memory contents, at that address, are shifted out on pin DQ0, pin DQ1, pin W/VPP/DQ2 and pin HOLD/DQ3 (1) at a maximum frequency fC, during the falling edge of Serial Clock (C). The instruction sequence is shown in Figure 15. The first byte addressed can be at any location. The address is automatically incremented to the next higher address after each byte of data is shifted out on pin DQ0, pin DQ1, pin W/VPP/DQ2 and pin HOLD/DQ3 (1). The whole memory can, therefore, be read with a single Quad Output Fast Read (QOFR) instruction. When the highest address is reached, the address counter rolls over to 00 0000h, so that the read sequence can be continued indefinitely. 84/180 N25Q128 - 3 V Note: Instructions Reset functionality is available instead of Hold in devices with a dedicated part number. See Section 16: Ordering information. Figure 15. Quad Input/Output Fast Read instruction sequence S Mode 3 C Mode 0 Instruction DQ0 0 1 2 Address 3 4 5 6 7 IO switches from Input to Output 4 0 4 0 4 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 21 22 23 24 25 26 27 DQ1 Don’t Care 5 1 5 1 5 DQ2 Don’t Care 6 2 6 2 6 DQ3 ‘1’ A23-16 A15-8 A7-0 Dummy (ex.: 10) 7 3 7 3 7 Byte 1 Byte 2 Quad_Output_Fast_Read 9.1.7 Quad I/O Fast Read The Quad I/O Fast Read (QIOFR) instruction is very similar to the Quad Output Fast Read (QOFR), except that the address bits are shifted in on four pins (pin DQ0, pin DQ1, pin W/VPP/DQ2 and pin HOLD/DQ3 (1)) instead of only one. Note: Reset functionality is available instead of Hold in devices with a dedicated part number. See Section 16: Ordering information. 85/180 Instructions Figure 16. Quad Input/ Output Fast Read instruction sequence S Mode 3 C Mode 0 Instruction DQ0 4 0 4 0 4 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 21 22 23 24 25 26 27 N25Q128 - 3 V IO switches from Input to Output 4 0 4 0 4 DQ1 Don’t Care 5 1 5 1 5 1 5 1 5 1 5 DQ2 Don’t Care 6 2 6 2 6 2 6 2 6 2 6 DQ3 ‘1’ 7 3 7 3 7 3 7 3 7 3 7 A23-16 A15-8 A7-0 Dummy (ex.: 10) Byte 1 Byte 2 Quad_IO_Fast_Read 9.1.8 Read OTP (ROTP) The device is first selected by driving Chip Select (S) Low. The instruction code for the Read OTP (ROTP) instruction is followed by a 3-byte address (A23- A0) and a dummy byte. Each bit is latched in on the rising edge of Serial Clock (C). Then the memory contents at that address are shifted out on Serial Data output (DQ1). Each bit is shifted out at the maximum frequency, fCmax, on the falling edge of Serial Clock (C). The instruction sequence is shown in Figure 17. The address is automatically incremented to the next higher address after each byte of data is shifted out. There is no rollover mechanism with the Read OTP (ROTP) instruction. This means that the Read OTP (ROTP) instruction must be sent with a maximum of 65 bytes to read. All other bytes outside the OTP area are “Don’t Care.” The Read OTP (ROTP) instruction is terminated by driving Chip Select (S) High. Chip Select (S) can be driven High at any time during data output. Any Read OTP (ROTP) instruction issued while an Erase, Program or Write cycle is in progress, is rejected without having any effect on the cycle that is in progress. 86/180 N25Q128 - 3 V Figure 17. Read OTP instruction and data-out sequence Instructions S 0 C Instruction 24-bit address 1 2 3 4 5 6 7 8 9 10 28 29 30 31 DQ0 High Impedance DQ1 23 22 21 3 2 1 0 S 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 C Dummy cycles DQ0 7 6 5 4 3 2 1 0 DATA OUT 1 DATA OUT n 1 0 7 MSB 6 5 4 3 2 1 0 7 MSB Read_OTP DQ1 7 MSB 6 5 4 3 2 9.1.9 Write Enable (WREN) The Write Enable (WREN) instruction (Figure 8) sets the Write Enable Latch (WEL) bit. The Write Enable Latch (WEL) bit must be set prior to every Program, Erase or Write instructions: Page Program (PP), Dual Input Fast Program (DIFP), Dual Input Extended Fast Program (DIEFP), Quad Input Fast Program (QIFP), Quad Input Extended Fast Program (QIEFP), Program OTP (POTP), Write to Lock Register (WRLR), Subsector Erase (SSE), Sector Erase (SE), Bulk Erase (BE), Write Status Register (WRSR), Write Configuration Register (WRCR), Write Enhanced Configuration Register (WRECR) and Write NV Configuration Register (WRNVCR) instruction. The Write Enable (WREN) instruction is entered by driving Chip Select (S) Low, sending the instruction code, and then driving Chip Select (S) High. When the Fast POR feature is selected (Non Volatile Configuration Register bit 5) after the first Write Enable instruction, the device enters in a latency time (~500 us), necessary to internally complete the POR sequence with the modify algorithms. (See Section 11.1: Fast POR.) During the POR latency time all the instructions are ignored with the exception of the 87/180 Instructions N25Q128 - 3 V polling instructions (to check if the internal cycle is finished by mean of the WIP bit of the Status Register or of the Program/Erase controller bit of the Flag Status register): to verify if the POR sequence is completed is possible to check the WIP bit in the Status Register or the Program/Erase Controller bit in the Flag Status Register, please note that the Program/Erase Controller bit in the Flag status register has the reverse logical polarity with respect to the Status Register WIP bit. At the end of the POR sequence the WEL bit is low, so the next modify instruction can be accepted. Figure 18. Write Enable instruction sequence S 0 C Instruction DQ0 High Impedance DQ1 AI13731 1 2 3 4 5 6 7 9.1.10 Write Disable (WRDI) The Write Disable (WRDI) instruction (Figure 9) resets the Write Enable Latch (WEL) bit. The Write Disable (WRDI) instruction is entered by driving Chip Select (S) Low, sending the instruction code, and then driving Chip Select (S) High. 88/180 N25Q128 - 3 V The Write Enable Latch (WEL) bit is reset under the following conditions: Power-up Write Disable (WRDI) instruction completion Write Status Register (WRSR) instruction completion Write lo Lock Register (WRLR) instruction completion Instructions Write Non Volatile Configuration Register (WRNVCR) instruction completion Write Volatile Configuration Register (WRVCR) instruction completion Write Volatile Enhanced Configuration Register (WRVECR) instruction completion Page Program (PP) instruction completion Dual Input Fast Program (DIFP) instruction completion Dual Input Extended Fast Program (DIEFP) instruction completion Quad Input Fast Program (QIFP) instruction completion Quad Input Extended Fast Program (QIEFP) instruction completion Program OTP (POTP) instruction completion Subsector Erase (SSE) instruction completion Sector Erase (SE) instruction completion Bulk Erase (BE) instruction completion Figure 19. Write Disable instruction sequence S 0 C Instruction DQ0 High Impedance DQ1 AI13732 1 2 3 4 5 6 7 9.1.11 Page Program (PP) The Page Program (PP) instruction allows bytes to be programmed in the memory (changing bits from 1 to 0). Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. After the Write Enable (WREN) instruction has been decoded, the device sets the Write Enable Latch (WEL). The Page Program (PP) instruction is entered by driving Chip Select (S) Low, followed by the instruction code, three address bytes and at least one data byte on Serial Data input (DQ0). If the 8 least significant address bits (A7-A0) are not all zero, all transmitted data that goes beyond the end of the current page are programmed from the start address of the 89/180 Instructions N25Q128 - 3 V same page (from the address whose 8 least significant bits (A7-A0) are all zero). Chip Select (S) must be driven Low for the entire duration of the sequence. If more than 256 bytes are sent to the device, previously latched data are discarded and the last 256 data bytes are guaranteed to be programmed correctly within the same page. If less than 256 data bytes are sent to device, they are correctly programmed at the requested addresses without having any effects on the other bytes of the same page. For optimized timings, it is recommended to use the Page Program (PP) instruction to program all consecutive targeted bytes in a single sequence versus using several Page Program (PP) sequences with each containing only a few bytes. See Table 32.: AC Characteristics. Chip Select (S) must be driven High after the eighth bit of the last data byte has been latched in, otherwise the Page Program (PP) instruction is not executed. As soon as Chip Select (S) is driven High, the self-timed Page Program cycle (whose duration is top) is initiated. While the Page Program cycle is in progress, the Status Register and the Flag Status Register may be read to check if the internal modify cycle is finished. At some unspecified time before the cycle is completed, the Write Enable Latch (WEL) bit is reset. A Page Program (PP) instruction applied to a page which is protected by the Block Protect (BP3,BP2, BP1, BP0 and TB) bits is not executed. Page Program cycle can be paused by mean of Program/Erase Suspend (PES) instruction and resumed by mean of Program/Erase Resume (PER) instruction. 90/180 N25Q128 - 3 V Figure 20. Page Program instruction sequence S 0 C Instruction 24-bit address (1) Data byte 1 1 2 3 4 5 6 7 8 9 10 Instructions 28 29 30 31 32 33 34 35 36 37 38 39 DQ0 23 22 21 MSB 3 2 1 0 7 6 5 4 3 2 1 0 MSB S 2072 2073 2074 2075 2076 2077 2 2078 1 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 C Data byte 2 Data byte 3 Data byte 256 2079 0 AI13739b DQ0 7 6 5 4 3 2 1 0 7 MSB 6 5 4 3 2 1 0 7 6 5 4 3 MSB MSB 9.1.12 Dual Input Fast Program (DIFP) The Dual Input Fast Program (DIFP) instruction is very similar to the Page Program (PP) instruction, except that the data are entered on two pins (pin DQ0 and pin DQ1) instead of only one. Inputting the data on two pins instead of one doubles the data transfer bandwidth compared to the Page Program (PP) instruction. The Dual Input Fast Program (DIFP) instruction is entered by driving Chip Select (S) Low, followed by the instruction code, three address bytes and at least one data byte on Serial Data input (DQ0). If the 8 least significant address bits (A7-A0) are not all zero, all transmitted data that goes beyond the end of the current page are programmed from the start address of the same page (from the address whose 8 least significant bits (A7-A0) are all zero). Chip Select (S) must be driven Low for the entire duration of the sequence. If more than 256 bytes are sent to the device, previously latched data are discarded and the last 256 data bytes are guaranteed to be programmed correctly within the same page. If less than 256 data bytes are sent to device, they are correctly programmed at the requested addresses without having any effects on the other bytes in the same page. For optimized timings, it is recommended to use the Dual Input Fast Program (DIFP) instruction to program all consecutive targeted bytes in a single sequence rather to using 91/180 Instructions N25Q128 - 3 V several Dual Input Fast Program (DIFP) sequences each containing only a few bytes. See Table 32.: AC Characteristics. Chip Select (S) must be driven High after the eighth bit of the last data byte has been latched in, otherwise the Dual Input Fast Program (DIFP) instruction is not executed. As soon as Chip Select (S) is driven High, the self-timed Page Program cycle (whose duration is top) is initiated. While the Dual Input Fast Program (DIFP) cycle is in progress, the Status Register and the Flag Status Register may be read to check if the internal modify cycle is finished. At some unspecified time before the cycle is completed, the Write Enable Latch (WEL) bit is reset. A Dual Input Fast Program (DIFP) instruction applied to a page that is protected by the Block Protect (BP3, BP2, BP1, BP0 and TB) bits is not executed. Dual Input Fast Program cycle can be paused by mean of Program/Erase Suspend (PES) instruction and resumed by mean of Program/Erase Resume (PER) instruction. Figure 21. Dual Input Fast Program instruction sequence S 0 C Instruction 24-bit address 1 2 3 4 5 6 7 8 9 10 28 29 30 31 DQ0 23 22 21 3 2 1 0 DQ1 High Impedance S 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 C DQ0 6 4 2 0 6 4 2 0 6 4 2 0 6 4 2 0 6 4 2 0 6 4 2 0 DATA IN 1 DQ1 7 MSB 5 3 1 DATA IN 2 7 MSB 5 3 1 DATA IN 3 7 MSB 5 3 1 7 DATA IN 4 5 3 1 7 DATA IN 5 5 3 1 DATA IN 256 7 MSB AI14229 5 3 1 MSB MSB 92/180 N25Q128 - 3 V Instructions 9.1.13 Dual Input Extended Fast Program The Dual Input Extended Fast Program (DIEFP) instruction is very similar to the Dual Input Fast Program (DIFP), except that the address bits are shifted in on two pins (pin DQ0 and pin DQ1) instead of only one. Figure 22. Dual Input Extended Fast Program instruction sequence S Mode 3 C Mode 0 Instruction DQ0 6 4 2 0 6 4 2 0 6 4 2 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 DQ1 7 5 3 1 7 5 3 1 7 5 3 1 Dummy Cycles Address S 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 C DQ0 6 4 2 0 6 4 2 0 6 4 2 0 6 4 2 0 6 4 2 0 Data In 1 DQ1 7 5 3 1 7 Data In 2 5 3 1 7 Data In 3 5 3 1 7 Data In 4 5 3 1 7 Data In 256 5 3 1 MSB MSB MSB MSB MSB Dual_Input_Extended_Fast_Program 9.1.14 Quad Input Fast Program The Quad Input Fast Program (QIFP) instruction is very similar to the Dual Input Fast Program (DIFP) instruction, except that the data are entered on four pins (pin DQ0, pin DQ1, pin W/VPP/DQ2 and pin HOLD/ (DQ3) instead of only two. Inputting the data on four pins instead of two doubles the data transfer bandwidth compared to the Dual Input Fast Program (DIFP) instruction. The Quad Input Fast Program (QIFP) instruction is entered by driving Chip Select (S) Low, followed by the instruction code, three address bytes and at least one data byte on Serial Data input (DQ0). If the 8 least significant address bits (A7-A0) are not all zero, all transmitted data that goes beyond the end of the current page are programmed from the start address of the same page (from the address whose 8 least significant bits (A7-A0) are all zero). Chip Select (S) must be driven Low for the entire duration of the sequence. 93/180 Instructions N25Q128 - 3 V If more than 256 bytes are sent to the device, previously latched data are discarded and the last 256 data bytes are guaranteed to be programmed correctly within the same page. If less than 256 data bytes are sent to device, they are correctly programmed at the requested addresses without having any effects on the other bytes in the same page. For optimized timings, it is recommended to use the Quad Input Fast Program (QIFP) instruction to program all consecutive targeted bytes in a single sequence rather to using several Quad Input Fast Program (QIFP) sequences each containing only a few bytes See Table 32.: AC Characteristics. Chip Select (S) must be driven High after the eighth bit of the last data byte has been latched in, otherwise the Quad Input Fast Program (QIFP) instruction is not executed. As soon as Chip Select (S) is driven High, the self-timed Page Program cycle (whose duration is tPP) is initiated. While the Quad Input Fast Program (QIFP) cycle is in progress, the Status Register may be read to check the value of the Write In Progress (WIP) bit. The Write In Progress (WIP) bit is 1 during the self-timed Page Program cycle, and 0 when it is completed. At some unspecified time before the cycle is completed, the Write Enable Latch (WEL) bit is reset. A Quad Input Fast Program (QIFP) instruction applied to a page that is protected by the Block Protect (BP3, BP2, BP1, BP0 and TB) bits is not executed. A Quad Input Fast Program cycle can be paused by mean of Program/Erase Suspend (PES) instruction and resumed by mean of Program/Erase Resume (PER) instruction. Figure 23. Quad Input Fast Program instruction sequence S 0 C Instruction 24-bit address 1 DQ0 23 22 21 3 2 1 0 4 0 4 Data In 2 0 4 3 0 Data In 4 4 0 4 5 0 4 Data In 6 0 1 2 3 4 5 6 7 8 9 10 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 DQ1 Don’t Care 5 Don’t Care 1 5 1 5 1 5 1 5 1 5 1 DQ2 6 Don’t Care ‘1’ 7 2 6 2 6 2 6 2 6 2 6 2 DQ3 3 7 3 7 3 7 3 7 3 7 3 MSB MSB MSB MSB MSB MSB Quad_Input_Fast_Program 9.1.15 Quad Input Extended Fast Program The Quad Input Extended Fast Program (QIEFP) instruction is very similar to the Quad Input Extended Fast Program (QIFP), except that the address bits are shifted in on four pins (pin DQ0, pin DQ1, pin W/VPP/DQ2 and pin HOLD/DQ3) instead of only one. 94/180 N25Q128 - 3 V Figure 24. Quad Input Extended Fast Program instruction sequence S 0 C Instruction 24-bit address Data In 1 DQ0 20 16 12 8 4 0 4 0 4 2 0 4 Data In 3 0 4 4 0 4 Data In 5 0 4 6 1 2 3 4 5 6 7 8 Instructions 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 7 0 4 0 DQ1 Don’t Care 21 17 13 9 Don’t Care 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 DQ2 22 18 14 10 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 2 DQ3 ‘1’ 23 19 15 11 7 3 7 3 7 3 7 3 7 3 7 3 7 3 7 3 MSB MSB MSB MSB MSB MSB MSB Quad_Input_Extended_Fast_Program 9.1.16 Program OTP instruction (POTP) The Program OTP instruction (POTP) is used to program at most 64 bytes to the OTP memory area (by changing bits from 1 to 0, only). Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. After the Write Enable (WREN) instruction has been decoded, the device sets the Write Enable Latch (WEL) bit. The Program OTP instruction is entered by driving Chip Select (S) Low, followed by the instruction opcode, three address bytes and at least one data byte on Serial Data input (DQ0). Chip Select (S) must be driven High after the eighth bit of the last data byte has been latched in, otherwise the Program OTP instruction is not executed. There is no rollover mechanism with the Program OTP (POTP) instruction. This means that the Program OTP (POTP) instruction must be sent with a maximum of 65 bytes to program, once all 65 bytes have been latched in, any following byte will be discarded. As soon as Chip Select (S) is driven High, the self-timed Page Program cycle (whose duration is tPP) is initiated. While the Program OTP cycle is in progress, the Status Register may be read to check the value of the Write In Progress (WIP) bit. The Write In Progress (WIP) bit is 1 during the self-timed Program OTP cycle, and it is 0 when it is completed. At some unspecified time before the cycle is complete, the Write Enable Latch (WEL) bit is reset. To lock the OTP memory: Bit 0 of the OTP control byte, that is byte 64, is used to permanently lock the OTP memory array. When bit 0 of byte 64 = '1', the 64 bytes of the OTP memory array can be programmed. When bit 0 of byte 64 = '0', the 64 bytes of the OTP memory array are read-only and cannot be programmed anymore. 95/180 Instructions N25Q128 - 3 V Once a bit of the OTP memory has been programmed to '0', it can no longer be set to '1'. Therefore, as soon as bit 0 of byte 64 (control byte) is set to '0', the 64 bytes of the OTP memory array become read-only in a permanent way. Any Program OTP (POTP) instruction issued while an Erase, Program or Write cycle is in progress is rejected without having any effect on the cycle that is in progress. Figure 25. Program OTP instruction sequence S 0 C Instruction 24-bit address Data byte 1 1 2 3 4 5 6 7 8 9 10 28 29 30 31 32 33 34 35 36 37 38 39 DQ0 23 22 21 MSB 3 2 1 0 7 6 5 4 3 2 1 0 MSB S 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 C Data byte 2 Data byte 3 Data byte n DQ0 7 6 5 4 3 2 1 0 7 MSB 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 MSB MSB AI13575 96/180 N25Q128 - 3 V Figure 26. How to permanently lock the OTP bytes 64 data bytes Instructions OTP control byte Byte Byte Byte 0 1 2 Byte Byte 63 64 X X X X X X X bit 0 When bit 0 = 0 the 64 OTP bytes become read only Bit 1 to bit 7 are not programmable ai13587 9.1.17 Subsector Erase (SSE) For devices with bottom or top architecture, at the bottom (or top) of the addressable area there are 8 boot sectors, each one having 16 4Kbytes subsectors. The Subsector Erase (SSE) instruction sets to '1' (FFh) all bits inside the chosen subsector. Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. After the Write Enable (WREN) instruction has been decoded, the device sets the Write Enable Latch (WEL). The Subsector Erase (SSE) instruction is entered by driving Chip Select (S) Low, followed by the instruction code, and three address bytes on Serial Data input (DQ0). Any address inside the subsector is a valid address for the Subsector Erase (SSE) instruction. Chip Select (S) must be driven Low for the entire duration of the sequence. Chip Select (S) must be driven High after the eighth bit of the last address byte has been latched in, otherwise the Subsector Erase (SSE) instruction is not executed. As soon as Chip Select (S) is driven High, the self-timed Subsector Erase cycle (whose duration is tSSE) is initiated. While the Subsector Erase cycle is in progress, the Status Register may be read to check the value of the Write In Progress (WIP) bit. The Write In Progress (WIP) bit is 1 during the self-timed Subsector Erase cycle, and is 0 when it is completed. At some unspecified time before the cycle is complete, the Write Enable Latch (WEL) bit is reset. A Subsector Erase (SSE) instruction issued to a sector that is hardware or software protected, is not executed. Any Subsector Erase (SSE) instruction, while an Erase, Program or Write cycle is in progress, is rejected without having any effects on the cycle that is in progress. Any Subsector Erase (SSE) instruction in devices with uniform architecture (meaning no boot sectors with subsectors) is rejected without having any effects on the device. 97/180 Instructions Figure 27. Subsector Erase instruction sequence S 0 C Instruction 24 Bit Address 1 2 3 4 5 6 7 8 9 29 30 31 N25Q128 - 3 V DQ0 23 22 MSB 2 1 0 Subsector_Erase 9.1.18 Sector Erase (SE) The Sector Erase (SE) instruction sets to '1' (FFh) all bits inside the chosen sector. Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. After the Write Enable (WREN) instruction has been decoded, the device sets the Write Enable Latch (WEL). The Sector Erase (SE) instruction is entered by driving Chip Select (S) Low, followed by the instruction code, and three address bytes on Serial Data input (DQ0). Any address inside the sector is a valid address for the Sector Erase (SE) instruction. Chip Select (S) must be driven Low for the entire duration of the sequence. Chip Select (S) must be driven High after the eighth bit of the last address byte has been latched in, otherwise the Sector Erase (SE) instruction is not executed. As soon as Chip Select (S) is driven High, the self-timed Sector Erase cycle (whose duration is tSE) is initiated. While the Sector Erase cycle is in progress, the Status Register may be read to check the value of the Write In Progress (WIP) bit. The Write In Progress (WIP) bit is 1 during the self-timed Sector Erase cycle, and is 0 when it is completed. At some unspecified time before the cycle is completed, the Write Enable Latch (WEL) bit is reset. A Sector Erase (SE) instruction applied to a page which is protected by the Block Protect (BP3, BP2, BP1, BP0 and TB) bits is not executed. A Sector Erase cycle can be paused by mean of Program/Erase Suspend (PES) instruction and resumed by mean of Program/Erase Resume (PER) instruction. 98/180 N25Q128 - 3 V Figure 28. Sector Erase instruction sequence S 0 C Instruction 24 Bit Address 1 2 3 4 5 6 7 8 9 29 30 31 Instructions DQ0 23 22 MSB 2 1 0 Sector_Erase 9.1.19 Bulk Erase (BE) The Bulk Erase (BE) instruction sets all bits to '1' (FFh). Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. After the Write Enable (WREN) instruction has been decoded, the device sets the Write Enable Latch (WEL). The Bulk Erase (BE) instruction is entered by driving Chip Select (S) Low, followed by the instruction code on Serial Data input (DQ0). Chip Select (S) must be driven Low for the entire duration of the sequence. Chip Select (S) must be driven High after the eighth bit of the instruction code has been latched in, otherwise the Bulk Erase instruction is not executed. As soon as Chip Select (S) is driven High, the self-timed Bulk Erase cycle (whose duration is tBE) is initiated. While the Bulk Erase cycle is in progress, the Status Register may be read to check the value of the Write In Progress (WIP) bit. The Write In Progress (WIP) bit is 1 during the self-timed Bulk Erase cycle, and is 0 when it is completed. At some unspecified time before the cycle is completed, the Write Enable Latch (WEL) bit is reset. The Bulk Erase (BE) instruction is executed only if all Block Protect (BP3, BP2, BP1, BP0) bits are 0. The Bulk Erase (BE) instruction is ignored if one, or more, sectors are protected. Figure 29. Bulk Erase instruction sequence S 0 C Instruction DQ0 1 2 3 4 5 6 7 AI13743 99/180 Instructions N25Q128 - 3 V 9.1.20 Program/Erase Suspend The Program/Erase Suspend instruction allows the controller to interrupt a Program or an Erase instruction, in particular: Sector Erase, Subsector Erase, Page Program, Dual Input Page Program, Dual Input Extended Page program, Quad Input Page Program and Quad Input Extended Page program can be suspended and erased. Note: Bulk Erase, Write Non Volatile Configuration register and Program OTP cannot be suspended. After a Program/Erase Suspend instruction the bit 2 of the Flag Status register is immediately set to 1 and, after a latency time, both the WIP bit of the Status Register and the Program/Erase controller bit (Not WIP) of the Flag Status Register are cleared (to 0 and to 1 respectively). The Suspended state is reset if a power-off is performed or after resume. After a sector erase instruction has been suspended, another erase instruction is not allowed; however, it is possible to perform program and reading instructions on all the sectors except the one whose erase cycle is suspended. Any read instruction issued on this sector outputs Don't Care data. After a subsector erase instruction has been suspended, neither an erase instruction or a program instruction is allowed; only a read instruction is allowed on all sectors except the one containing the subsector whose erase cycle is suspended. Any read instruction issued on this sector outputs Don't Care data. After a program instruction has been suspended, neither a program instruction or an erase instructions is allowed; however, it is possible to perform a read instruction on all pages except the one whose program cycle is suspended. Any read instruction issued on this page outputs Don't Care data. It's possible to nest a suspend instruction inside another suspended one just once, meaning that it's possible for example to send to the device an erase instruction, then suspend it, then send a program instruction and in the end suspend it as well. In this case the next Program/Erase Resume Instruction resumes the more recent suspended modify cycles, another Program/Erase Resume Instruction is need to resume also the former one. Table 17. Parameter Erase to Suspend Program to Suspend SSErase to Suspend Suspend Latency Suspend Parameters Condition Sector Erase or Erase Resume to Erase Suspend Program Resume to Program Suspend Sub Sector Erase or Sub Sector Erase Resume to Erase Suspend Program Sub Sector Erase Erase Typ 40 5 40 7 15 15 Max Unit µs µs µs µs µs µs Note Timing not internally controlled Timing not internally controlled Timing not internally controlled Any Read instruction accepted Any Read instruction accepted Any instruction accepted but DP, SE, SSE, BE, WRSR, WRNVCR, POTP 100/180 N25Q128 - 3 V Instructions Table 18. Operations Allowed / Disallowed During Device States Device States and Sector (Same/Other) in Which Operation is Allowed/Disallowed (Yes/No) Subsector Erase Suspended State Sector Program Suspended State Sector Erase Suspended State Sector Standby State Program State Operation Sector Same Other All Reads except RDSR / RDFSR Yes Yes Sector Same No Other No Erase State (SE/SSE) Sector Same Other Same Other Same Other Same Other No No Yes(1) Yes Yes Yes Yes(1) Yes Array Program: PP / DIFP / Yes QWIFP / DIEFP / QIEFP Sector Erase Sub-Sector Erase Yes Yes Yes No No No No No No No No No Yes Yes Yes No No No No No No No No No No No No No No No No No No No No WRLR / POTP / BE / WRSR / Yes WRNVCR WVCR / WVECR Yes No No No No No No Yes Yes No Yes Yes Yes Yes No Yes Yes No Yes Yes No RDSR / RDFSR Yes Program / No Erase Suspend 1. The Read operation is accepted but the data output is not guaranetted until the program or erase has completed. Note: The device can be in only one state at a time, such as Standby, Program, Erase, and so on. Device states are shown in Table 18.: Operations Allowed / Disallowed During Device States. 9.1.21 Program/Erase Resume After a Program/Erase suspend instruction, a Program/Erase Resume instruction is required to continue performing the suspended Program or Erase sequence. Program/Erase Resume instruction is ignored if the device is not in a Program/Erase Suspended status. The WIP bit of the Status Register and Program/Erase controller bit (Not WIP) of the Flag Status Register both switch to the busy state (1 and 0 respectively) after Program/Erase Resume instruction until the Program or Erase sequence is completed. In this case the next Program/Erase Resume Instruction resumes the more recent suspended modify cycles, another Program/Erase Resume Instruction is need to resume also the former one. 101/180 Instructions N25Q128 - 3 V 9.1.22 Read Status Register (RDSR) The Read Status Register (RDSR) instruction allows the Status Register to be read. The Status Register may be read at any time, even while a Program, Erase or Write Status Register cycle is in progress. When one of these cycles is in progress, it is recommended to check the Write In Progress (WIP) bit (or the Program/Erase controller bit of the Flag Status Register) before sending a new instruction to the device. It is also possible to read the Status Register continuously, as shown here. Figure 30. Read Status Register instruction sequence S 0 C Instruction DQ0 Status register out High Impedance DQ1 7 MSB 6 5 4 3 2 1 0 7 MSB AI13734 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Status register out 6 5 4 3 2 1 0 7 9.1.23 Write status register (WRSR) The write status register (WRSR) instruction allows new values to be written to the status register. Before it can be accepted, a write enable (WREN) instruction must previously have been executed. After the write enable (WREN) instruction has been decoded and executed, the device sets the write enable latch (WEL). The write status register (WRSR) instruction is entered by driving Chip Select (S) Low, followed by the instruction code and the data byte on serial data input (DQ0). The write status register (WRSR) instruction has no effect on b1 and b0 of the status register. Chip Select (S) must be driven High after the eighth bit of the data byte has been latched in. If not, the write status register (WRSR) instruction is not executed. As soon as Chip Select (S) is driven High, the self-timed write status register cycle (whose duration is tow) is initiated. While the write status register cycle is in progress, the status register may still be read to check the value of the write in progress (WIP) bit. The write in progress (WIP) bit is 1 during the self-timed write status register cycle, and is 0 when it is completed. When the cycle is completed, the write enable latch (WEL) is reset. The write status register (WRSR) instruction allows the user to change the values of the block protect (BP3, BP2, BP1, BP0) bits, to define the size of the area that is to be treated as read-only, as defined in Table 3. The write status register (WRSR) instruction also allows the user to set and reset the status register write disable (SRWD) bit in accordance with the Write Protect (W/VPP) signal. The status register write disable (SRWD) bit and Write Protect (W/VPP) signal allow the device to be put in the hardware protected mode (HPM). The write 102/180 N25Q128 - 3 V Instructions status register (WRSR) instruction is not executed once the hardware protected mode (HPM) is entered. Figure 31. Write Status Register instruction sequence S 0 C Instruction Status register in 7 High Impedance DQ1 AI13735 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 DQ0 6 5 4 3 2 1 0 MSB The protection features of the device are summarized in Table 8. When the Status Register Write Disable (SRWD) bit of the Status Register is 0 (its initial delivery state), it is possible to write to the Status Register provided that the Write Enable Latch (WEL) bit has previously been set by a Write Enable (WREN) instruction, regardless of the whether Write Protect (W/VPP) is driven High or Low. When the Status Register Write Disable (SRWD) bit of the Status Register is set to '1', two cases need to be considered, depending on the state of Write Protect (W/VPP): If Write Protect (W/VPP) is driven High, it is possible to write to the Status Register provided that the Write Enable Latch (WEL) bit has previously been set by a Write Enable (WREN) instruction. If Write Protect (W/VPP) is driven Low, it is not possible to write to the Status Register even if the Write Enable Latch (WEL) bit has previously been set by a Write Enable (WREN) instruction (attempts to write to the Status Register are rejected, and are not accepted for execution). As a consequence, all the data bytes in the memory area that are software protected (SPM) by the Block Protect (BP3, BP2, BP1, BP0) bits of the Status Register, are also hardware protected against data modification. Regardless of the order of the two events, the Hardware Protected mode (HPM) can be entered in either of the following ways: setting the Status Register Write Disable (SRWD) bit after driving Write Protect (W/VPP) Low driving Write Protect (W/VPP) Low after setting the Status Register Write Disable (SRWD) bit. The only way to exit the Hardware Protected mode (HPM) once entered is to pull Write Protect (W/VPP) High. If Write Protect (W/VPP) is permanently tied High, the Hardware Protected mode (HPM) can never be activated, and only the Software Protected mode (SPM), using the Block Protect (BP3, BP2, BP1, BP0) bits of the Status Register, can be used. 103/180 Instructions N25Q128 - 3 V Table 19. W / VPP Signal 1 0 1 Protection modes SRWD bit 0 0 1 Software protected (SPM) Mode Write protection of the status register Status register is writeable, if the WREN instruction has set the WEL bit. The values in the SRWD, TB, BP3, BP2, BP1, and BP0 bits can be changed. Status Register is hardware write protected. The values in the SRWD, TB, BP3, BP2, BP1 and BP0 bits cannot be changed Memory content Protected area (1) Unprotected area (1) Protected against PP, DIFP, DIEFP, QIFP, QIEFP, SSE, SE and BE instructions. PP, DIFP, DIEFP, QIFP, QIEFP, SSE, SE and BE instructions. Ready to accept PP, DIFP, DIEFP, QIFP, QIEFP, SSE, and SE instructions. 0 1 Hardware protected (HPM) PP, DIFP, DIEFP, QIFP, QIEFP, SSE, and SE instructions. 1. As defined by the values in the Block Protect (TB, BP3, BP2, BP1, BP0) bits of the Status Register, as shown in Table 2: Status register format. 9.1.24 Read Lock Register (RDLR) The device is first selected by driving Chip Select (S) Low. The instruction code for the Read Lock Register (RDLR) instruction is followed by a 3-byte address (A23-A0) pointing to any location inside the concerned sector. Each address bit is latched-in during the rising edge of Serial Clock (C). Then the value of the Lock Register is shifted out on Serial Data output (DQ1), each bit being shifted out, at a maximum frequency fC, during the falling edge of Serial Clock (C). The Read Lock Register (RDLR) instruction is terminated by driving Chip Select (S) High at any time during data output. Any Read Lock Register (RDLR) instruction, while an Erase, Program or Write cycle is in progress, is rejected without having any effects on the cycle that is in progress. Figure 32. Read Lock Register instruction and data-out sequence S 0 C Instruction 24-bit address 1 2 3 4 5 6 7 8 9 10 28 29 30 31 32 33 34 35 36 37 38 39 DQ0 High Impedance DQ1 23 22 21 MSB 3 2 1 0 Lock register out 7 6 5 4 3 2 1 0 MSB AI13738 104/180 N25Q128 - 3 V Instructions Table 20. Bit b7-b2 Lock Register out(1) Bit name Value Reserved Function b1 Sector Lock Down ‘1’ ‘0’ ‘1’ The Write Lock and Lock Down bits cannot be changed. Once a ‘1’ is written to the Lock Down bit it cannot be cleared to ‘0’, except by a power-up. The Write Lock and Lock Down bits can be changed by writing new values to them. Write, Program and Erase operations in this sector will not be executed. The memory contents will not be changed. Write, Program and Erase operations in this sector are executed and will modify the sector contents. b0 Sector Write Lock ‘0’ 1. Values of (b1, b0) after power-up are defined in Section 7: Protection modes. 9.1.25 Write to Lock Register (WRLR) The Write to Lock Register (WRLR) instruction allows bits to be changed in the Lock Registers. Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. After the Write Enable (WREN) instruction has been decoded, the device sets the Write Enable Latch (WEL). The Write to Lock Register (WRLR) instruction is entered by driving Chip Select (S) Low, followed by the instruction code, three address bytes (pointing to any address in the targeted sector and one data byte on Serial Data input (DQ0). The instruction sequence is shown in Figure 22. Chip Select (S) must be driven High after the eighth bit of the data byte has been latched in, otherwise the Write to Lock Register (WRLR) instruction is not executed. Lock Register bits are volatile, and therefore do not require time to be written. When the Write to Lock Register (WRLR) instruction has been successfully executed, the Write Enable Latch (WEL) bit is reset after a delay time less than tSHSL minimum value. Any Write to Lock Register (WRLR) instruction, while an Erase, Program or Write cycle is in progress, is rejected without having any effects on the cycle that is in progress. Figure 33. Write to Lock Register instruction sequence S 0 C Instruction 24-bit address Lock register in 1 2 3 4 5 6 7 8 9 10 28 29 30 31 32 33 34 35 36 37 38 39 DQ0 23 22 21 MSB 3 2 1 0 7 6 5 4 3 2 1 0 MSB AI13740 105/180 Instructions N25Q128 - 3 V Table 21. Lock Register in(1) Bit b7-b2 Value ‘0’ Sector Lock Down bit value (refer to Table 20) Sector Write Lock bit value (refer to Table 20) Sector All sectors b1 b0 1. Values of (b1, b0) after power-up are defined in Section 7: Protection modes. 9.1.26 Read Flag Status Register The Read Flag Status Register (RFSR) instruction allows the Flag Status Register to be read. The Status Register may be read at any time, even while a Program, Erase. When one of these cycles is in progress, it is recommended to check the P/E Controller bit (Not WIP) bit before sending a new instruction to the device. It is also possible to read the Flag Register continuously, as shown here. Figure 34. Read Flag Status Register instruction sequence S 0 C Instruction DQ0 Flag Status Register Out High Impedance DQ1 7 6 5 4 MSB 3 2 1 0 7 6 5 4 MSB Read_Flag_SR 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Flag Status Register Out 3 2 1 0 7 9.1.27 Clear Flag Status Register The Clear Flag Status Register (CLFSR) instruction reset the error Flag Status Register bits (Erase Error bit, Program Error bit, VPP Error bit, Protection Error bit). It is not necessary to set the WEL bit before the Clear Flag Status Register instruction is executed. The WEL bit will be unchanged after this command is executed. 106/180 N25Q128 - 3 V Figure 35. Clear Flag Status Register instruction sequence Instructions S 0 C Instruction 1 2 3 4 5 6 7 8 DQ0 High Impedance DQ1 Clear_Flag_SR MSB 9.1.28 Read NV Configuration Register The Read Non Volatile Configuration Register (RDNVCR) instruction allows the Non Volatile Configuration Register to be read. Figure 36. Read NV Configuration Register instruction sequence S 0 C Instruction DQ0 NVCR Out High Impedance DQ1 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 MS Byte Read_NVCR 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 NVCR Out 8 LS Byte 9.1.29 Write NV Configuration Register The Write Non Volatile Configuration register (WRNVCR) instruction allows new values to be written to the Non Volatile Configuration register. Before it can be accepted, a write enable (WREN) instruction must previously have been executed. After the write enable (WREN) instruction has been decoded and executed, the device sets the write enable latch (WEL). The Write Non Volatile Configuration register (WRNVCR) instruction is entered by driving Chip Select (S) Low, followed by the instruction code and the data bytes on serial data input (DQ0). Chip Select (S) must be driven High after the 16th bit of the data bytes has been latched in. If not, the Write Non Volatile Configuration register (WRNVCR) instruction is not executed. 107/180 Instructions N25Q128 - 3 V As soon as Chip Select (S) is driven High, the self-timed write NV configuration register cycle (whose duration is tnvcr) is initiated. While the Write Non Volatile Configuration register cycle is in progress, it is possible to monitor the end of the process by polling status Register write in progress (WIP) bit or the Flag Status Register Program/Erase Controller bit. The write in progress (WIP) bit is 1 during the self-timed Write Non Volatile Configuration register cycle, and is 0 when it is completed. When the cycle is completed, the write enable latch (WEL) is reset. The Write Non Volatile Configuration register (WRNVCR) instruction allows the user to change the values of all the Non Volatile Configuration Register bits, described in Table 3.: Non-Volatile Configuration Register. The Write Non Volatile Configuration Register impacts the memory behavior only after the next power on sequence. Figure 37. Write NV Configuration Register instruction sequence S 0 C Instruction Byte DQ0 High Impedance DQ1 Write_NVCR 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 NVCR In Byte 3 2 1 0 15 14 13 12 11 10 9 MS Byte 8 7 6 5 4 LS Byte 9.1.30 Read Volatile Configuration Register The Read Volatile Configuration Register (RDVCR) instruction allows the Volatile Configuration Register to be read. See Table 5.: Volatile Configuration Register. 108/180 N25Q128 - 3 V Figure 38. Read Volatile Configuration Register instruction sequence S 0 C Instruction DQ0 Volatile Configuration Register Out 7 6 5 4 3 2 1 0 7 Volatile Configuration Register Out 6 5 4 MSB 3 2 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Instructions High Impedance DQ1 0 7 MSB Read_VCR 9.1.31 Write Volatile Configuration Register The Write Volatile Configuration register (WRVCR) instruction allows new values to be written to the Volatile Configuration register. Before it can be accepted, a write enable (WREN) instruction must have been executed. After the write enable (WREN) instruction has been decoded and executed, the device sets the write enable latch (WEL). In case of Fast POR (see section 11.1 for further details) the WREN instruction is not required because a WREN instruction gets the device out from the Fast POR state. The Write Volatile Configuration register (WRVCR) instruction is entered by driving Chip Select (S) Low, followed by the instruction code and the data byte on serial data input (DQ0). Chip Select (S) must be driven High after the eighth bit of the data byte has been latched in. If not, the Write Volatile Configuration register (WRVCR) instruction is not executed. When the new data are latched, the write enable latch (WEL) is reset. The Write Volatile Configuration register (WRVCR) instruction allows the user to change the values of all the Volatile Configuration Register bits, described in Table 5.: Volatile Configuration Register. The Write Volatile Configuration Register impacts the memory behavior right after the instruction is received by the device. 109/180 Instructions Figure 39. Write Volatile Configuration Register instruction sequence N25Q128 - 3 V S 0 C Instruction Volatile Configuration Register In 7 High Impedance DQ1 Write_VCR 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 DQ0 6 5 4 3 2 1 0 MSB 9.1.32 Read Volatile Enhanced Configuration Register The Read Volatile Enhanced Configuration Register (RDVECR) instruction allows the Volatile Configuration Register to be read. Figure 40. Read Volatile Enhanced Configuration Register instruction sequence S 0 C Instruction DQ0 Volatile Enhanced Configuration Register Out 7 6 5 4 3 2 1 0 7 Volatile Enhanced Configuration Register Out 6 5 4 3 2 1 0 7 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 High Impedance DQ1 MSB MSB Read_VECR 9.1.33 Write Volatile Enhanced Configuration Register The Write Volatile Enhanced Configuration register (WRVECR) instruction allows new values to be written to the Volatile Enhanced Configuration register. Before it can be accepted, a write enable (WREN) instruction must previously have been executed. After the write enable (WREN) instruction has been decoded and executed, the device sets the write enable latch (WEL). In case of Fast POR, the WREN instruction is not required because a WREN instruction gets the device out from the Fast POR state (see Section 11.1: Fast POR). 110/180 N25Q128 - 3 V Instructions The Write Volatile Enhanced Configuration register (WRVECR) instruction is entered by driving Chip Select (S) Low, followed by the instruction code and the data byte on serial data input (DQ0). Chip Select (S) must be driven High after the eighth bit of the data byte has been latched in. If not, the Write Volatile Enhanced Configuration register (WRVECR) instruction is not executed. When the new data are latched, the write enable latch (WEL) is reset. The Write Volatile Enhanced Configuration register (WRVECR) instruction allows the user to change the values of all the Volatile Enhanced Configuration Register bits, described in Table 6.: Volatile Enhanced Configuration Register. The Write Volatile Enhanced Configuration Register impacts the memory behavior right after the instruction is received by the device. Figure 41. Write Volatile Enhanced Configuration Register instruction sequence S 0 C Instruction VECR In 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 DQ0 High Impedance DQ1 7 MSB 6 5 4 3 2 1 0 Write_VECR 9.2 DIO-SPI Instructions In DIO-SPI protocol, instructions, addresses and input/Output data always run in parallel on two wires: DQ0 and DQ1. In the case of a Dual Command Fast Read (DCFR), Read OTP (ROTP), Read Lock Registers (RDLR), Read Status Register (RDSR), Read Flag Status Register (RFSR), Read NV Configuration Register (RDNVCR), Read Volatile Configuration Register (RDVCR), Read Volatile Enhanced Configuration Register (RDVECR) and Read Identification (RDID) instruction, the shifted-in instruction sequence is followed by a data-out sequence. Chip Select (S) can be driven High after any bit of the data-out sequence is being shifted out. In the case of a Dual Command Page Program (DCPP), Program OTP (POTP), Subsector Erase (SSE), Sector Erase (SE), Bulk Erase (BE), Program/Erase Suspend (PES), Program/Erase Resume (PER), Write Status Register (WRSR), Clear Flag Status Register (CLFSR), Write to Lock Register (WRLR), Write Configuration Register (WRVCR), Write 111/180 Instructions N25Q128 - 3 V Enhanced Configuration Register (WRVECR), Write NV Configuration Register (WRNVCR), Write Enable (WREN) or Write Disable (WRDI) instruction, Chip Select (S) must be driven High exactly at a byte boundary, otherwise the instruction is rejected, and is not executed. All attempts to access the memory array during a Write Status Register cycle, a Write Non Volatile Configuration Register, a Program cycle or an Erase cycle are ignored, and the internal Write Status Register cycle, Write Non Volatile Configuration Register, Program cycle or Erase cycle continues unaffected, the only exception is the Program/Erase Suspend instruction (PES), that can be used to pause all the program and the erase cycles but the Program OTP (POT),, Bulk Erase (BE) and Write Non Volatile Configuration Register. The suspended program or erase cycle can be resumed by mean of the Program/Erase Resume instruction (PER). During the program/erase cycles also the polling instructions (to check if the internal modify cycle is finished by mean of the WIP bit of the Status Register or of the Program/Erase controller bit of the Flag Status register) are also accepted to allow the application checking the end of the internal modify cycles, of course these polling instructions don't affect the internal cycles performing. Table 22. Instruction set: DIO-SPI protocol (page 1 of 2) One-byte Instruction Code (BIN) 1010 1111 0000 1011 DCFR Dual Command Fast Read 0011 1011 1011 1011 ROTP WREN WRDI Read OTP Write Enable Write Disable 0100 1011 0000 0110 0000 0100 0000 0010 DCPP Dual Command Page Program 1010 0010 1101 0010 POTP SSE SE BE PER PES RDSR WRSR RDLR WRLR (2) Instruction Description One-byte Dummy Instruction Address clock Code bytes cycle (HEX) AFh 0Bh 3Bh BBh 4Bh 06h 04h 02h A2h D2h 42h 20h D8h C7h 7Ah 75h 05h 01h E8h E5h 0 3 3 3 3 0 0 3 3 3 3 3 3 0 0 0 0 0 3 3 0 8 (1) 8(1) 8 8 (1) (1) Data bytes 1 to 3 1 to ∞ 1 to ∞ 1 to ∞ 1 to 65 0 0 1 to 256 1 to 256 1 to 256 1 to 65 0 0 0 0 0 1 to ∞ 1 1 to ∞ 1 MIORDID Multiple I/O read identification 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Program OTP SubSector Erase Sector Erase Bulk Erase Program/Erase Resume Program/Erase Suspend Read Status Register Write Status Register Read Lock Register Write to Lock Register 0100 0010 0010 0000 1101 1000 1100 0111 0111 1010 0111 0101 0000 0101 0000 0001 1110 1000 1110 0101 112/180 N25Q128 - 3 V Table 22. Instruction set: DIO-SPI protocol (page 2 of 2) One-byte Instruction Code (BIN) 0111 0000 0101 0000 1011 0101 1011 0001 1000 0101 1000 0001 0110 0101 0110 0001 Instructions Instruction Description One-byte Dummy Instruction Address clock Code bytes cycle (HEX) 70h 50h B5h B1h 85h 81h 65h 61h 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Data bytes 1 to ∞ 0 2 2 1 to ∞ 1 1 to ∞ 1 RFSR CLFSR RDNVCR WRNVCR RDVCR WRVCR RDVECR WRVECR Read Flag Status Register Clear Flag Status Register Read NV Configuration Register Write NV Configuration Register Read Volatile Configuration Register Write Volatile Configuration Register Read Volatile Enhanced Configuration Register Write Volatile Enhanced Configuration Register 1) The number of Dummy Clock cycles is configurable by the user 2) SSE is only available in devices with Bottom or Top architecture. 9.2.1 Multiple I/O Read Identification protocol The Multiple Input/Output Read Identification (MIORDID) instruction allows to read the device identification data in the DIO-SPI protocol: – – Manufacturer identification (1 byte) Device identification (2 bytes) Unlike the RDID instruction of the Extended SPI protocol, the Multiple Input/Output instruction can not read the Unique ID code (UID) (17 bytes). For further details on the manufacturer and device identification codes please refer to Section 9.1.1: Read Identification (RDID). Any Multiple Input/Output Read Identification (MIORDID) instruction while an Erase or Program cycle is in progress, is not decoded, and has no effect on the cycle that is in progress. The device is first selected by driving Chip Select (S) Low. Then, the 8-bit instruction code for the instruction is shifted in parallel on the 2 pins DQ0 and DQ1. After this, the 24-bit device identification, stored in the memory, will be shifted out on again in parallel on DQ1 and DQ0. Each two bits are shifted out during the falling edge of Serial Clock (C). The Read Identification (RDID) instruction is terminated by driving Chip Select (S) High at any time during data output. When Chip Select (S) is driven High, the device is put in the Standby Power mode. Once in the Standby Power mode, the device waits to be selected, so that it can receive, decode and execute instructions. 113/180 Instructions N25Q128 - 3 V Figure 42. Multiple I/O Read Identification instruction and data-out sequence DIOSPI S 0 C MAN. code 6 4 2 0 6 DEV. code 4 2 0 6 SIZE code 4 2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 AFh DQ0 DQ1 7 5 3 1 7 5 3 1 7 5 3 1 Dual_Multi_Read_IO 9.2.2 Dual Command Fast Read (DCFR) The Dual Command Fast Read (DCFR) instruction allows to read the memory in DIO-SPI protocol, parallelizing the instruction code, the address and the output data on two pins (DQ0 and DQ1). The Dual Command Fast Read (DCFR) instruction can be issued, when the device is set in DIO-SPI mode, by sending to the memory indifferently one of the 3 instructions codes: 0Bh, 3Bh or BBh, the effect is exactly the same. The 3 instruction codes are all accepted to help the application code porting from Extended SPI protocol to DIO-SPI protocol. Apart for the parallelizing on two pins of the instruction code, the Dual Command Fast Read instruction functionality is exactly the same as the Dual I/O Fast Read of the Extended SPI protocol, please refer to Section 9.1.5: Dual I/O Fast Read for further details. Figure 43. Dual Command Fast Read instruction and data-out sequence DIO-SPI S 0 C 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 Instruction DQ0 24-Bit Address 22 20 18 16 14 12 10 8 6 4 2 0 Dummy cycles Data Out 1 Data Out n 6 4 2 0 6 4 2 0 DQ1 23 21 19 17 15 13 11 9 7 5 3 1 7 5 3 1 7 MSB 5 3 1 MSB Dual_Command_Fast_Read 114/180 N25Q128 - 3 V Instructions 9.2.3 Read OTP (ROTP) The Read OTP (ROTP) instruction is used to read the 64 bytes OTP area in the DIO-SPI protocol. The instruction functionality is exactly the same as the Read OTP instruction of the Extended SPI protocol; the only difference is that in the DIO-SPI protocol instruction code, address and output data are all parallelized on the two pins DQ0 and DQ1. Note: The dummy bits can not be parallelized since these clock cycles are requested to perform the internal reading operation. Figure 44. Read OTP instruction and data-out sequence DIO-SPI S 0 C 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 Instruction DQ0 24-Bit Address 22 20 18 16 14 12 10 8 6 4 2 0 Dummy cycles Data Out 1 Data Out n 6 4 2 0 6 4 2 0 DQ1 23 21 19 17 15 13 11 9 7 5 3 1 7 5 3 1 7 MSB 5 3 1 MSB Dual_Read_OTP 9.2.4 Write Enable (WREN) The Write Enable (WREN) instruction sets the Write Enable Latch (WEL) bit. Apart form the parallelizing of the instruction code on the two pins DQ0 and DQ1, the instruction functionality is exactly the same as the Write Enable (WREN) instruction of the Extended SPI protocol. Figure 45. Write Enable instruction sequence DIO-SPI S 0 C Instruction DQ0 1 2 3 4 DQ1 Dual_Write_Enable 115/180 Instructions N25Q128 - 3 V 9.2.5 Write Disable (WRDI) The Write Disable (WRDI) instruction resets the Write Enable Latch (WEL) bit. Apart form the parallelizing of the instruction code on the two pins DQ0 and DQ1, the instruction functionality is exactly the same as the Write Disable (WRDI) instruction of the Extended SPI protocol, please refer to Section 9.1.10: Write Disable (WRDI) for further details. Figure 46. Write Disable instruction sequence DIO-SPI S 0 C Instruction DQ0 1 2 3 4 DQ1 Dual_Write_Disable 9.2.6 Dual Command Page Program (DCPP) The Dual Command Page Program (DCPP) instruction allows to program the memory content in DIO-SPI protocol, parallelizing the instruction code, the address and the input data on two pins (DQ0 and DQ1). Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. The Dual Command Page Program (DCPP) instruction can be issued, when the device is set in DIO-SPI mode, by sending to the memory indifferently one of the 3 instructions codes: 02h, A2h or D2h, the effect is exactly the same. The 3 instruction codes are all accepted to help the application code porting from Extended SPI protocol to DIO-SPI protocol. Apart for the parallelizing on two pins of the instruction code, the Dual Command Page Program instruction functionality is exactly the same as the Dual Input Extended Fast Program of the Extended SPI protocol, please refer to Section 9.1.13: Dual Input Extended Fast Program for further details. 116/180 N25Q128 - 3 V Instructions Figure 47. Dual Command Page Program instruction sequence DSP, 02h S 0 C 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1037 1039 1036 1038 Instruction DQ0 24-Bit Address 22 20 18 16 14 12 10 8 6 4 2 0 6 Data Byte 1 4 2 0 Data Byte 2 Data Byte 256 6 4 2 0 6 4 2 0 DQ1 23 21 19 17 15 13 11 9 7 5 3 1 7 5 3 1 7 5 3 1 7 5 3 1 Dual_Page_Program_02h Figure 48. Dual Command Page Program instruction sequence DSP, A2h S 0 C 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1037 1039 1036 1038 Instruction DQ0 24-Bit Address 22 20 18 16 14 12 10 8 6 4 2 0 6 Data Byte 1 4 2 0 Data Byte 2 Data Byte 256 6 4 2 0 6 4 2 0 DQ1 23 21 19 17 15 13 11 9 7 5 3 1 7 5 3 1 7 5 3 1 7 5 3 1 Dual_Page_Program_A2h Figure 49. Dual Command Page Program instruction sequence DSP, D2h S 0 C 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1037 1039 1036 1038 Instruction DQ0 24-Bit Address 22 20 18 16 14 12 10 8 6 4 2 0 6 Data Byte 1 4 2 0 Data Byte 2 Data Byte 256 6 4 2 0 6 4 2 0 DQ1 23 21 19 17 15 13 11 9 7 5 3 1 7 5 3 1 7 5 3 1 7 5 3 1 Dual_Page_Program_D2h 117/180 Instructions N25Q128 - 3 V 9.2.7 Program OTP instruction (POTP) The Program OTP instruction (POTP) is used to program at most 64 bytes to the OTP memory area (by changing bits from 1 to 0, only). Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. Apart form the parallelizing of the instruction code, address and input data on the two pins DQ0 and DQ1, the instruction functionality (as well as the locking OTP method) is exactly the same as the Program OTP (POTP) instruction of the Extended SPI protocol, please refer to Section 9.1.16: Program OTP instruction (POTP) for further details. Figure 50. Program OTP instruction sequence DIO-SPI S 0 C 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 Instruction DQ0 24-Bit Address 22 20 18 16 14 12 10 8 6 4 2 0 Data Byte 1 6 4 2 0 Data Byte 2 Data Byte n 6 4 2 0 6 4 2 0 DQ1 23 21 19 17 15 13 11 9 7 5 3 1 7 5 3 1 7 5 3 1 7 5 3 1 Dual_Program_OTP 9.2.8 Subsector Erase (SSE) For devices with bottom or top architecture, at the bottom (or top) of the addressable area there are 8 boot sectors, each one having 16 4Kbytes subsectors. The Subsector Erase (SSE) instruction sets to '1' (FFh) all bits inside the chosen subsector. Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. Apart form the parallelizing of the instruction code and the address on the two pins DQ0 and DQ1, the instruction functionality is exactly the same as the Subsector Erase (SSE) instruction of the Extended SPI protocol, please refer to Section 9.1.17: Subsector Erase (SSE) for further details. 118/180 N25Q128 - 3 V Figure 51. Subsector Erase instruction sequence DIO-SPI Instructions S 0 C 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Instruction DQ0 24-Bit Address 22 20 18 16 14 12 10 8 6 4 2 0 DQ1 23 21 19 17 15 13 11 9 7 5 3 1 Dual_S ubsector_E se ra 9.2.9 Sector Erase (SE) The Sector Erase (SE) instruction sets to '1' (FFh) all bits inside the chosen sector. Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. Apart form the parallelizing of the instruction code and the address on the two pins DQ0 and DQ1, the instruction functionality is exactly the same as the Sector Erase (SE) instruction of the Extended SPI protocol, please refer to Section 9.1.18: Sector Erase (SE) for further details. Figure 52. Sector Erase instruction sequence DIO-SPI S 0 C 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Instruction DQ0 24-Bit Address 22 20 18 16 14 12 10 8 6 4 2 0 DQ1 23 21 19 17 15 13 11 9 7 5 3 1 Dual_Sector_Erase 119/180 Instructions N25Q128 - 3 V 9.2.10 Bulk Erase (BE) The Bulk Erase (BE) instruction sets all bits to '1' (FFh). Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. Apart form the parallelizing of the instruction code on the two pins DQ0 and DQ1, the instruction functionality is exactly the same as the Bulk Erase (BE) instruction of the Extended SPI protocol, please refer to Section 9.1.19: Bulk Erase (BE) for further details. Figure 53. Bulk Erase instruction sequence DIO-SPI S 0 C Instruction DQ0 1 2 3 DQ1 Dual_Bulk_Erase 9.2.11 Program/Erase Suspend The Program/Erase Suspend instruction allows the controller to interrupt a Program or an Erase instruction, in particular: Sector Erase and Dual Command Page Program can be suspended and erased while Subsector Erase, Bulk Erase, Write Non Volatile Configuration register, and Program OTP cannot be suspended. Apart form the parallelizing of the instruction code on the two pins DQ0 and DQ1, the instruction functionality is exactly the same as the Program/Erase Suspend (PES) instruction of the Extended SPI protocol. 120/180 N25Q128 - 3 V Figure 54. Program/Erase Suspend instruction sequence DIO-SPI Instructions S 0 C Instruction DQ0 1 2 3 4 DQ1 Dual_Program_Erase_Suspend 9.2.12 Program/Erase Resume After a Program/Erase suspend instruction, a Program/Erase Resume instruction is required to continue performing the suspended Program or Erase sequence. Apart form the parallelizing of the instruction code on the two pins DQ0 and DQ1, the instruction functionality is exactly the same as the Program/Erase Resume (PER) instruction of the Extended SPI protocol, please refer to Section 9.1.21: Program/Erase Resume for further details. Figure 55. Program/Erase Resume instruction sequence DIO-SPI S 0 C Instruction DQ0 1 2 3 4 DQ1 Dual_Program_Erase_Resume 121/180 Instructions N25Q128 - 3 V 9.2.13 Read Status Register (RDSR) The Read Status Register (RDSR) instruction allows the Status Register to be read. Apart form the parallelizing of the instruction code and the output data on the two pins DQ0 and DQ1, the instruction functionality is exactly the same as the Read Status Register (RDSR) instruction of the Extended SPI protocol, please refer to Section 9.1.22: Read Status Register (RDSR) for further details. Figure 56. Read Status Register instruction sequence DIO-SPI S 0 C Status Register Out Byte Byte 6 4 2 0 6 4 2 0 1 2 3 4 5 6 7 8 9 10 11 Instruction DQ0 DQ1 7 5 3 1 7 5 3 1 Dual_Read_SR 9.2.14 Write status register (WRSR) The write status register (WRSR) instruction allows new values to be written to the status register. Before it can be accepted, a write enable (WREN) instruction must previously have been executed. Apart form the parallelizing of the instruction code and the input data on the two pins DQ0 and DQ1, the instruction functionality and the protection feature management is exactly the same as the Write Status Register (WRSR) instruction of the Extended SPI protocol, please refer to Section 9.1.23: Write status register (WRSR) for further details. Figure 57. Write Status Register instruction sequence DIO-SPI S 0 C Status Register In Instruction DQ0 6 Byte 4 2 0 1 2 3 4 5 6 7 DQ1 7 5 3 1 Dual_Write_SR 122/180 N25Q128 - 3 V Instructions 9.2.15 Read Lock Register (RDLR) The Read Lock Register instructions is used to read the lock register content. Apart form the parallelizing of the instruction code, the address and the output data on the two pins DQ0 and DQ1, the instruction functionality is exactly the same as the Read Lock Register (RDLR) instruction of the Extended SPI protocol, please refer to Section 9.1.24: Read Lock Register (RDLR) for further details. Figure 58. Read Lock Register instruction and data-out sequence DIO-SPI S 0 C 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 12 13 14 15 Instruction DQ0 24-Bit Address 22 20 18 16 14 12 10 8 6 4 2 0 Lock Register Out 6 4 2 0 DQ1 23 21 19 17 15 13 11 9 7 5 3 1 7 5 3 1 Dual_Read_LR 9.2.16 Write to Lock Register (WRLR) The Write to Lock Register (WRLR) instruction allows bits to be changed in the Lock Registers. Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. Apart form the parallelizing of the instruction code, the address and the input data on the two pins DQ0 and DQ1, the instruction functionality is exactly the same as the Write to Lock Register (WRLR) instruction of the Extended SPI protocol, please refer to Section 9.1.25: Write to Lock Register (WRLR) for further details. 123/180 Instructions Figure 59. Write to Lock Register instruction sequence DIO-SPI S 0 C 1 2 3 4 5 6 7 8 N25Q128 - 3 V 9 10 11 12 13 14 15 12 13 14 15 Instruction DQ0 24-Bit Address 22 20 18 16 14 12 10 8 6 4 2 0 Lock Register In 6 4 2 0 DQ1 23 21 19 17 15 13 11 9 7 5 3 1 7 5 3 1 Dual_Write_LR 9.2.17 Read Flag Status Register The Read Flag Status Register (RFSR) instruction allows the Flag Status Register to be read. Apart form the parallelizing of the instruction code and the output data on the two pins DQ0 and DQ1, the instruction functionality is exactly the same as the Read Flag Status Register (RFSR) instruction of the Extended SPI protocol, please refer to Section 9.1.26: Read Flag Status Register for further details. Figure 60. Read Flag Status Register instruction sequence DIO-SPI S 0 C Instruction Flag Status Register Out Byte Byte 6 4 2 0 6 4 2 0 1 2 3 4 5 6 7 8 9 10 11 DQ0 DQ1 7 5 3 1 7 5 3 1 Dual_Read_Flag_SR 124/180 N25Q128 - 3 V Instructions 9.2.18 Clear Flag Status Register The Clear Flag Status Register (CLFSR) instruction reset the error Flag Status Register bits (Erase Error bit, Program Error bit, VPP Error bit, Protection Error bit). It is not necessary to set the WEL bit before the Clear Flag Status Register instruction is executed. The WEL bit will be unchanged after this command is executed. Figure 61. Clear Flag Status Register instruction sequence DIO-SPI S 0 C Instruction 1 2 3 DQ0 DQ1 Dual_Clear_Flag_SR 9.2.19 Read NV Configuration Register The Read Non Volatile Configuration Register (RDNVCR) instruction allows the Non Volatile Configuration Register to be read. Figure 62. Read NV Configuration Register instruction sequence DIO-SPI S 0 C NVCR Out Instruction DQ0 6 Byte 4 2 0 Byte 14 12 10 8 1 2 3 4 5 6 7 8 9 10 11 DQ1 7 5 3 1 15 13 11 9 MS Byte Dual_Read_NVCR LS Byte 125/180 Instructions N25Q128 - 3 V 9.2.20 Write NV Configuration Register The Write Non Volatile Configuration register (WRNVCR) instruction allows new values to be written to the Non Volatile Configuration register. Before it can be accepted, a write enable (WREN) instruction must previously have been executed. Apart form the parallelizing of the instruction code and the input data on the two pins DQ0 and DQ1, the instruction functionality is exactly the same as the Write Non Volatile Configuration Register (WNVCR) instruction of the Extended SPI protocol, please refer to Section 9.1.29: Write NV Configuration Register for further details. Figure 63. Write NV Configuration Register instruction sequence DIO-SPI S 0 C NVCR In Instruction DQ0 6 Byte 4 2 0 Byte 14 12 10 8 1 2 3 4 5 6 7 8 9 10 11 DQ1 7 5 3 1 15 13 11 9 MS Byte Dual_Write_NVCR LS Byte 9.2.21 Read Volatile Configuration Register The Read Volatile Configuration Register (RDVCR) instruction allows the Volatile Configuration Register to be read. See Table 5.: Volatile Configuration Register. 126/180 N25Q128 - 3 V Instructions Figure 64. Read Volatile Configuration Register instruction sequence DIO-SPI S 0 C Volatile Configuration Register Out Byte Byte 6 4 2 0 6 4 2 0 1 2 3 4 5 6 7 8 9 10 11 Instruction DQ0 DQ1 7 5 3 1 7 5 3 1 Dual_Read_VCR 9.2.22 Write Volatile Configuration Register The Write Volatile Configuration register (WRVCR) instruction allows new values to be written to the Volatile Configuration register. Before it can be accepted, a write enable (WREN) instruction must have been executed previously. In case of Fast POR, the WREN instruction is not required because a WREN instruction gets the device out from the Fast POR state (See Section 11.1: Fast POR). Apart form the parallelizing of the instruction code and the input data on the two pins DQ0 and DQ1, the instruction functionality is exactly the same as the Write Volatile Configuration Register (WVCR) instruction of the Extended SPI protocol, please refer to Section 9.1.31: Write Volatile Configuration Register for further details. Figure 65. Write Volatile Configuration Register instruction sequence DIO-SPI S 0 C Volatile Configuration Register In Byte Byte 6 4 2 0 6 4 2 0 1 2 3 4 5 6 7 8 9 10 11 Instruction DQ0 DQ1 7 5 3 1 7 5 3 1 Dual_Write_VCR 127/180 Instructions N25Q128 - 3 V 9.2.23 Read Volatile Enhanced Configuration Register The Read Volatile Enhanced Configuration Register (RDVECR) instruction allows the Volatile Configuration Register to be read. Figure 66. Read Volatile Enhanced Configuration Register instruction sequence DIO-SPI S 0 C Volatile Enhanced Configuration Register Out Byte Byte 6 4 2 0 6 4 2 0 1 2 3 4 5 6 7 8 9 10 11 Instruction DQ0 DQ1 7 5 3 1 7 5 3 1 Dual_Read_VECR 9.2.24 Write Volatile Enhanced Configuration Register The Write Volatile Enhanced Configuration register (WRVECR) instruction allows new values to be written to the Volatile Enhanced Configuration register. Before it can be accepted, a write enable (WREN) instruction must previously have been executed. In case of Fast POR, the WREN instruction is not required because a WREN instruction gets the device out from the Fast POR state (See Section 11.1: Fast POR). Apart form the parallelizing of the instruction code and the input data on the two pins DQ0 and DQ1, the instruction functionality is exactly the same as the Write Volatile Enhanced Configuration Register (WRVECR) instruction of the Extended SPI protocol, please refer to Section 9.1.33: Write Volatile Enhanced Configuration Register for further details. 128/180 N25Q128 - 3 V Instructions Figure 67. Write Volatile Enhanced Configuration Register instruction sequence DIO-SPI S 0 C Volatile Enhanced Configuration Register In Byte Byte 6 4 2 0 6 4 2 0 1 2 3 4 5 6 7 8 9 10 11 Instruction DQ0 DQ1 7 5 3 1 7 5 3 1 Dual_Write_VECR 9.3 QIO-SPI Instructions In QIO-SPI protocol, instructions, addresses and Input/Output data always run in parallel on four wires: DQ0, DQ1, DQ2 and DQ3 with the already mentioned exception of the modify instruction (erase and program) performed with the VPP=VPPh. In the case of a Quad Command Fast Read (QCFR), Read OTP (ROTP), Read Lock Registers (RDLR), Read Status Register (RDSR), Read Flag Status Register (RFSR), Read NV Configuration Register (RDNVCR), Read Volatile Configuration Register (RDVCR), Read Volatile Enhanced Configuration Register (RDVECR) and Read Identification (RDID) instruction, the shifted-in instruction sequence is followed by a data-out sequence. Chip Select (S) can be driven High after any bit of the data-out sequence is being shifted out. In the case of a Quad Command Page Program (QCPP), Program OTP (POTP), Subsector Erase (SSE), Sector Erase (SE), Bulk Erase (BE), Program/Erase Suspend (PES), Program/Erase Resume (PER), Write Status Register (WRSR), Clear Flag Status Register (CLFSR), Write to Lock Register (WRLR), Write Configuration Register (WRVCR), Write Enhanced Configuration Register (WRVECR), Write NV Configuration Register (WRNVCR), Write Enable (WREN) or Write Disable (WRDI) instruction, Chip Select (S) must be driven High exactly at a byte boundary, otherwise the instruction is rejected, and is not executed. All attempts to access the memory array during a Write Status Register cycle, a Write Non Volatile Configuration Register, a Program cycle or an Erase cycle are ignored, and the internal Write Status Register cycle, Write Non Volatile Configuration Register, Program cycle or Erase cycle continues unaffected, the only exception is the Program/Erase Suspend instruction (PES), that can be used to pause all the program and the erase cycles but the Program OTP (POT),, Bulk Erase (BE) and Write Non Volatile Configuration Register. The suspended program or erase cycle can be resumed by mean of the Program/Erase Resume instruction (PER). During the program/erase cycles also the polling instructions (to check if the internal modify cycle is finished by mean of the WIP bit of the 129/180 Instructions N25Q128 - 3 V Status Register or of the Program/Erase controller bit of the Flag Status register) are also accepted to allow the application checking the end of the internal modify cycles, of course these polling instructions don't affect the internal cycles performing. Table 23. Instruction set: QIO-SPI protocol One-byte Instruction Code (BIN) 1010 1111 0000 1011 QCFR Quad Command Fast Read 0110 1011 1110 1011 ROTP WREN WRDI Read OTP (Read of OTP area) Write Enable Write Disable 0100 1011 0000 0110 0000 0100 0000 0010 QCPP Quad Command Page Program 0011 0010 0001 0010 POTP SSE(2) SE BE PER PES RDSR WRSR RDLR WRLR RFSR CLFSR RDNVCR WRNVCR RDVCR WRVCR RDVECR WRVECR Program OTP (Program of OTP area) SubSector Erase Sector Erase Bulk Erase Program/Erase Resume Program/Erase Suspend Read Status Register Write Status Register Read Lock Register Write to Lock Register Read Flag Status Register Clear Flag Status Register Read NV Configuration Register Write NV Configuration Register 0100 0010 0010 0000 1101 1000 1100 0111 0111 1010 0111 0101 0000 0101 0000 0001 1110 1000 1110 0101 0111 0000 0101 0000 1011 0101 1011 0001 One-byte Dummy Instruction Address clock Code bytes cycle (HEX) AFh 0Bh 6Bh EBh 4Bh 06h 04h 02h 32h 12h 42h 20h D8h C7h 7Ah 75h 05h 01h E8h E5h 70h 50h B5h B1h 85h 81h 65h 61h 0 3 3 3 3 0 0 3 3 3 3 3 3 0 0 0 0 0 3 3 0 0 0 0 0 0 0 0 0 10 10 (1) (1) Instruction Description Data bytes 1 to 3 1 to ∞ 1 to ∞ 1 to ∞ 1 to 65 0 0 1 to 256 1 to 256 1 to 256 1 to 65 0 0 0 0 0 1 to ∞ 1 1 to ∞ 1 1 to ∞ 0 2 2 1 to ∞ 1 1 to ∞ 1 MIORDID Multiple I/O read identification 10 (1) 10 (1) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Read Volatile Configuration Register 1000 0101 Write Volatile Configuration Register 1000 0001 Read Volatile Enhanced Configuration Register Write Volatile Enhanced Configuration Register 0110 0101 0110 0001 130/180 N25Q128 - 3 V 1) The Instructions number of Dummy Clock cycles is configurable by the user. 2) SSE is only available in devices with Bottom or Top architecture 9.3.1 Multiple I/O Read Identification (MIORDID) The Multiple Input/Output Read Identification (MIORDID) instruction allows to read the device identification data in the QIO-SPI protocol: Manufacturer identification (1 byte) Device identification (2 bytes) Unlike the RDID instruction of the Extended SPI protocol, the Multiple Input/Output instruction can not read the Unique ID code (UID) (17 bytes). For further details on the manufacturer and device identification codes, see 9.1.1: Read Identification (RDID). Any Multiple Input/Output Read Identification (MIORDID) instruction while an Erase or Program cycle is in progress, is not decoded, and has no effect on the cycle that is in progress. The device is first selected by driving Chip Select (S) Low. Then, the 8-bit instruction code for the instruction is shifted in parallel on the 4 pins DQ0, DQ1, DQ2 and DQ3. After this, the 24-bit device identification, stored in the memory, will be shifted out on again in parallel on DQ0, DQ1, DQ2 and DQ3. The identification bits are shifted out 4 at a time during the falling edge of Serial Clock (C). The Read Identification (RDID) instruction is terminated by driving Chip Select (S) High at any time during data output. When Chip Select (S) is driven High, the device is put in the Standby Power mode. Once in the Standby Power mode, the device waits to be selected, so that it can receive, decode and execute instructions. Multiple I/O Read Identification (MIORDID) instruction sequence and data-out sequence QIO-SPI. 131/180 Instructions N25Q128 - 3 V Figure 68. Multiple I/O Read Identification instruction and data-out sequence QIOSPI S 0 C AFh DQ0 MAN. code 4 0 DEV. code 4 0 SIZE code 4 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 DQ1 5 1 5 1 5 1 DQ2 6 2 6 2 6 2 DQ3 7 3 7 3 7 3 Quad_Multi_Read_IO 9.3.2 Quad Command Fast Read (QCFR) The Quad Command Fast Read (QCFR) instruction allows to read the memory in QIO-SPI protocol, parallelizing the instruction code, the address and the output data on four pins (DQ0, DQ1, DQ2 and DQ3). The Quad Command Fast Read (QCFR) instruction can be issued, after the device is set in QIO-SPI mode, by sending to the memory indifferently one of the 3 instructions codes: 0Bh, 6Bh or EBh, the effect is exactly the same. The 3 instruction codes are all accepted to help the application code porting from Extended SPI protocol to QIO-SPI protocol. Apart for the parallelizing on four pins of the instruction code, the Quad Command Fast Read instruction functionality is exactly the same as the Quad I/O Fast Read of the Extended SPI protocol, please refer to Section 9.1.7: Quad I/O Fast Read for further details. 132/180 N25Q128 - 3 V Instructions Figure 69. Quad Command Fast Read instruction and data-out sequence QSP, 0Bh S Mode 3 C Mode 0 Instruction DQ0 4 0 4 0 4 0 IO switches from Input to Output 4 0 4 0 4 0 4 0 4 0 4 0 0 1 2 3 4 5 6 7 8 9 10 15 16 17 18 19 20 21 22 23 24 25 26 27 DQ1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 4 0 4 0 DQ2 6 2 6 2 6 2 6 2 6 2 6 2 6 2 4 0 4 0 DQ3 7 3 7 3 7 3 7 3 7 3 7 3 7 3 4 0 4 0 A23-16 A15-8 A7-0 Dummy (ex.: 10) Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Quad_Command_Fast_Read_0Bh Figure 70. Quad Command Fast Read instruction and data-out sequence QSP, 6Bh S Mode 3 C Mode 0 Instruction DQ0 4 0 4 0 4 0 IO switches from Input to Output 4 0 4 0 4 0 4 0 4 0 4 0 0 1 2 3 4 5 6 7 8 9 10 15 16 17 18 19 20 21 22 23 24 25 26 27 DQ1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 4 0 4 0 DQ2 6 2 6 2 6 2 6 2 6 2 6 2 6 2 4 0 4 0 DQ3 7 3 7 3 7 3 7 3 7 3 7 3 7 3 4 0 4 0 A23-16 A15-8 A7-0 Dummy (ex.: 10) Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Quad_Command_Fast_Read_EBh 133/180 Instructions N25Q128 - 3 V Figure 71. Quad Command Fast Read instruction and data-out sequence QSP, EBh S Mode 3 C Mode 0 Instruction DQ0 4 0 4 0 4 0 IO switches from Input to Output 4 0 4 0 4 0 4 0 4 0 4 0 0 1 2 3 4 5 6 7 8 9 10 15 16 17 18 19 20 21 22 23 24 25 26 27 DQ1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 4 0 4 0 DQ2 6 2 6 2 6 2 6 2 6 2 6 2 6 2 4 0 4 0 DQ3 7 3 7 3 7 3 7 3 7 3 7 3 7 3 4 0 4 0 A23-16 A15-8 A7-0 Dummy (ex.: 10) Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Quad_Command_Fast_Read_EBh 9.3.3 Read OTP (ROTP) The Read OTP (ROTP) instruction is used to read the 64 bytes OTP area in the QIO-SPI protocol. The instruction functionality is exactly the same as the Read OTP instruction of the Extended SPI protocol. The only difference is that in the QIO-SPI protocol instruction code, address and output data are all parallelized on the four pins DQ0, DQ1, DQ2 and DQ3. Note: The dummy byte bits can not be parallelized: 8 clock cycles are requested to perform the internal reading operation. 134/180 N25Q128 - 3 V Figure 72. Read OTP instruction and data-out sequence QIO-SPI S 0 C Instruction DQ0 4 0 4 0 4 0 Data out 1 4 0 Data out n 4 0 4 0 1 2 3 4 5 6 7 8 9 10 15 16 17 18 19 20 21 22 23 Instructions DQ1 5 1 5 1 5 1 5 1 5 1 5 1 DQ2 6 2 6 2 6 2 6 2 6 2 6 2 DQ3 7 3 7 3 7 3 7 3 7 3 7 3 Dummy (ex.: 10) Quad_Read_OTP 9.3.4 Write Enable (WREN) The Write Enable (WREN) instruction sets the Write Enable Latch (WEL) bit. Apart form the parallelizing of the instruction code on the four pins DQ0, DQ1, DQ2 and DQ3, the instruction functionality is exactly the same as the Write Enable instruction of the Extended SPI protocol, please refer to Section 9.1.9: Write Enable (WREN) for further details. Figure 73. Write Enable instruction sequence QIO-SPI S 0 C Instruction DQ0 DQ1 DQ2 DQ3 Quad_Write_Enable 1 135/180 Instructions N25Q128 - 3 V 9.3.5 Write Disable (WRDI) The Write Disable (WRDI) instruction resets the Write Enable Latch (WEL) bit. Apart form the parallelizing of the instruction code on the four pins DQ0, DQ1, DQ2 and DQ3, the instruction functionality is exactly the same as the Write Disable (WRDI) instruction of the Extended SPI protocol, please refer to Section 9.1.10: Write Disable (WRDI) for further details. Figure 74. Write Disable instruction sequence QIO-SPI S 0 C Instruction DQ0 DQ1 DQ2 DQ3 Quad_Write_Disable 1 9.3.6 Quad Command Page Program (QCPP) The Quad Command Page Program (QCPP) instruction allows to program the memory content in DIO-SPI protocol, parallelizing the instruction code, the address and the input data on four pins (DQ0, DQ1, DQ2 and DQ3). Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. The Quad Command Page Program (QCPP) instruction can be issued, when the device is set in QIO-SPI mode, by sending to the memory indifferently one of the 3 instructions codes: 02h, 12h or 32h, the effect is exactly the same. The 3 instruction codes are all accepted to help the application code porting from Extended SPI protocol to QIO-SPI protocol. Apart for the parallelizing on four pins of the instruction code, the Quad Command Page Program instruction functionality is exactly the same as the Quad Input Extended Fast Program of the Extended SPI protocol, please refer to Section 9.1.15: Quad Input Extended Fast Program for further details. 136/180 N25Q128 - 3 V Instructions Figure 75. Quad Command Page Program instruction sequence QIO-SPI, 02h S Mode 3 C Mode 0 24-bit address 1 DQ0 20 16 12 8 4 0 4 0 4 2 Data In 3 0 4 0 4 4 0 Data In 254 255 4 0 4 0 256 4 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 514 515 516 517 518 519 DQ1 21 17 13 9 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 DQ2 22 18 14 10 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 2 DQ3 23 19 15 11 7 3 7 3 7 3 7 3 7 3 7 3 7 3 7 3 MSB MSB MSB MSB MSB MSB Quad_Command_Page_Program_02h Figure 76. Quad Command Page Program instruction sequence QIO-SPI, 12h S Mode 3 C Mode 0 24-bit address 1 DQ0 20 16 12 8 4 0 4 0 4 2 Data In 3 0 4 0 4 4 0 Data In 254 255 4 0 4 0 256 4 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 514 515 516 517 518 519 DQ1 21 17 13 9 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 DQ2 22 18 14 10 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 2 DQ3 23 19 15 11 7 3 7 3 7 3 7 3 7 3 7 3 7 3 7 3 MSB MSB MSB MSB MSB MSB Quad_Command_Page_Program_12h 137/180 Instructions N25Q128 - 3 V Figure 77. Quad Command Page Program instruction sequence QIO-SPI, 32h S Mode 3 C Mode 0 24-bit address 1 DQ0 20 16 12 8 4 0 4 0 4 2 Data In 3 0 4 0 4 4 0 Data In 254 255 4 0 4 0 256 4 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 514 515 516 517 518 519 DQ1 21 17 13 9 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 DQ2 22 18 14 10 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 2 DQ3 23 19 15 11 7 3 7 3 7 3 7 3 7 3 7 3 7 3 7 3 MSB MSB MSB MSB MSB MSB Quad_Command_Page_Program_12h 9.3.7 Program OTP instruction (POTP) The Program OTP instruction (POTP) is used to program at most 64 bytes to the OTP memory area (by changing bits from 1 to 0, only). Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. Apart form the parallelizing of the instruction code, address and input data on the four pins DQ0, DQ1, DQ2 and DQ3, the instruction functionality (as well as the locking OTP method) is exactly the same as the Program OTP (POTP) instruction of the Extended SPI protocol, please refer to Section 9.1.16: Program OTP instruction (POTP) for further details. 138/180 N25Q128 - 3 V Figure 78. Program OTP instruction sequence QIO-SPI Instructions S 0 C Instruction DQ0 24-Bit Address 20 16 12 8 4 0 Data byte1 4 0 Data Data byte 2 byte n 4 0 4 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 DQ1 21 17 13 9 5 1 5 1 5 6 1 2 5 6 1 2 DQ2 DQ3 22 18 14 10 6 2 6 2 23 19 15 11 7 3 7 3 7 3 7 3 Quad_Program_OTP 9.3.8 Subsector Erase (SSE) For devices with a dedicated part number, at the bottom (or top) of the addressable area there are 8 boot sectors, each one having 16 4Kbytes subsectors. (See Section 16: Ordering information.) The Subsector Erase (SSE) instruction sets to '1' (FFh) all bits inside the chosen subsector. Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. Apart form the parallelizing of the instruction code and the address on the four pins DQ0, DQ1, DQ2 and DQ3, the instruction functionality is exactly the same as the Subsector Erase (SSE) instruction of the Extended SPI protocol, please refer to Section 9.1.17: Subsector Erase (SSE) for further details. 139/180 Instructions Figure 79. Subsector Erase instruction sequence QIO-SPI S 0 C Instruction DQ0 24-Bit Address 20 16 12 8 4 0 1 2 3 4 5 6 7 8 9 N25Q128 - 3 V DQ1 21 17 13 9 5 1 DQ2 DQ3 22 18 14 10 6 2 23 19 15 11 7 3 Quad_Subsector_Erase 9.3.9 Sector Erase (SE) The Sector Erase (SE) instruction sets to '1' (FFh) all bits inside the chosen sector. Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. Apart form the parallelizing of the instruction code and the address on the four pins DQ0, DQ1, DQ2 and DQ3, the instruction functionality is exactly the same as the Sector Erase (SE) instruction of the Extended SPI protocol, please refer to Section 9.1.18: Sector Erase (SE) for further details. Figure 80. Sector Erase instruction sequence QIO-SPI S 0 C Instruction DQ0 24-Bit Address 20 16 12 8 4 0 1 2 3 4 5 6 7 8 9 DQ1 21 17 13 9 5 1 DQ2 DQ3 22 18 14 10 6 2 23 19 15 11 7 3 Quad_Sector_Erase 140/180 N25Q128 - 3 V Instructions 9.3.10 Bulk Erase (BE) The Bulk Erase (BE) instruction sets all bits to '1' (FFh). Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. Apart form the parallelizing of the instruction code on the four pins DQ0, DQ1, DQ2 and DQ3, the instruction functionality is exactly the same as the Bulk Erase (BE) instruction of the Extended SPI protocol, please refer to Section 9.1.19: Bulk Erase (BE) for further details. Figure 81. Bulk Erase instruction sequence QIO-SPI S 0 C Instruction DQ0 1 DQ1 DQ2 DQ3 Quad_Bulk_Erase 9.3.11 Program/Erase Suspend The Program/Erase Suspend instruction allows the controller to interrupt a Program or an Erase instruction, in particular: Sector Erase and Quad Command Page Program can be suspended and erased while that Subsector Erase, Bulk Erase, Write Non Volatile Configuration register and Program OTP can not be suspended. Apart form the parallelizing of the instruction code on the four pins DQ0, DQ1, DQ2 and DQ3, the instruction functionality is exactly the same as the Program/Erase Suspend (PES) instruction of the Extended SPI protocol, please refer to Section 9.1.20: Program/Erase Suspend for further details. 141/180 Instructions Figure 82. Program/Erase Suspend instruction sequence QIO-SPI N25Q128 - 3 V S 0 C Instruction DQ0 1 DQ1 DQ2 DQ3 Quad_Program_Erase_Suspend 9.3.12 Program/Erase Resume After a Program/Erase suspend instruction, a Program/Erase Resume instruction is required to continue performing the suspended Program or Erase sequence. Apart form the parallelizing of the instruction code on the four pins DQ0, DQ1, DQ2 and DQ3, the instruction functionality is exactly the same as the Program/Erase Resume (PER) instruction of the Extended SPI protocol, please refer to Section 9.1.21: Program/Erase Resume for further details. 142/180 N25Q128 - 3 V Figure 83. Program/Erase Resume instruction sequence QIO-SPI Instructions S 0 C Instruction DQ0 1 DQ1 DQ2 DQ3 Quad_Program_Erase_Resume 9.3.13 Read Status Register (RDSR) The Read Status Register (RDSR) instruction allows the Status Register to be read. Apart form the parallelizing of the instruction code and the output data on the four pins DQ0, DQ1, DQ2 and DQ3, the instruction functionality is exactly the same as the Read Status Register (RDSR) instruction of the Extended SPI protocol, please refer to Section 9.1.22: Read Status Register (RDSR) for further details. 143/180 Instructions Figure 84. Read Status Register instruction sequence QIO-SPI N25Q128 - 3 V S 0 C Instruction DQ0 4 0 4 0 Status Register Out 4 0 4 0 4 0 4 0 4 0 4 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 DQ1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 DQ2 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 2 DQ3 7 3 7 3 7 3 7 3 7 3 7 3 7 3 7 3 Quad_Read_SR 9.3.14 Write status register (WRSR) The write status register (WRSR) instruction allows new values to be written to the status register. Before it can be accepted, a write enable (WREN) instruction must previously have been executed. The instruction code and the input data are sent on four pins DQ0, DQ1, DQ2 and DQ3. The instruction functionality is exactly the same as the Write Status Register (WRSR) instruction of the Extended SPI protocol (See Section 9.1.23: Write status register (WRSR)). However, the protection feature management is different. In particular, once SRWD bit is set to '1' the device enters in the hardware protected mode (HPM) independently from Write Protect (W/VPP) signal value. To exit the HPM mode is needed to switch temporarily to the Extended SPI protocol. 144/180 N25Q128 - 3 V Figure 85. Write Status Register instruction sequence QIO-SPI Instructions S 0 C Status Register In DQ0 4 0 1 2 3 DQ1 5 1 DQ2 6 2 DQ3 7 3 Quad_Write_SR 9.3.15 Read Lock Register (RDLR) The Read Lock Register instructions is used to read the lock register content. Apart form the parallelizing of the instruction code, the address and the output data on the four pins DQ0, DQ1, DQ2 and DQ3, the instruction functionality is exactly the same as the Read Lock Register (RDLR) instruction of the Extended SPI protocol, please refer to Section 9.1.24: Read Lock Register (RDLR) for further details. 145/180 Instructions N25Q128 - 3 V Figure 86. Read Lock Register instruction and data-out sequence QIO-SPI S 0 C Instruction DQ0 24-bit address 20 16 12 8 4 0 4 0 Lock Register Out 4 0 4 0 4 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 DQ1 21 17 13 9 5 1 5 1 5 1 5 1 5 1 DQ2 22 18 14 10 6 2 6 2 6 2 6 2 6 2 DQ3 23 19 15 11 7 3 7 3 7 3 7 3 7 3 Quad_Read_LR 9.3.16 Write to Lock Register (WRLR) The Write to Lock Register (WRLR) instruction allows bits to be changed in the Lock Registers. Before it can be accepted, a Write Enable (WREN) instruction must previously have been executed. Apart form the parallelizing of the instruction code, the address and the input data on the four pins DQ0, DQ1, DQ2 and DQ3, the instruction functionality is exactly the same as the Write to Lock Register (WRLR) instruction of the Extended SPI protocol, please refer to Section 9.1.25: Write to Lock Register (WRLR) for further details. 146/180 N25Q128 - 3 V Figure 87. Write to Lock Register instruction sequence QIO-SPI Instructions S 0 C Instruction DQ0 24-Bit Address 20 16 12 8 4 0 Lock Register In 4 0 1 2 3 4 5 6 7 8 9 DQ1 21 17 13 9 5 1 5 1 DQ2 DQ3 22 18 14 10 6 2 6 2 23 19 15 11 7 3 7 3 Quad_Write_LR 9.3.17 Read Flag Status Register The Read Flag Status Register (RFSR) instruction allows the Flag Status Register to be read. Apart form the parallelizing of the instruction code and the output data on the four pins DQ0, DQ1, DQ2 and DQ3, the instruction functionality is exactly the same as the Read Flag Status Register (RFSR) instruction of the Extended SPI protocol, please refer to Section 9.1.26: Read Flag Status Register for further details. 147/180 Instructions Figure 88. Read Flag Status Register instruction sequence QIO-SPI N25Q128 - 3 V S Mode 3 C Mode 0 Instruction DQ0 4 0 4 0 4 0 Flag Status Register Out 4 0 4 0 4 0 4 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 DQ1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 DQ2 6 2 6 2 6 2 6 2 6 2 6 2 6 2 DQ3 7 3 7 3 7 3 7 3 7 3 7 3 7 3 Quad_Read_Flag_SR 9.3.18 Clear Flag Status Register The Clear Flag Status Register (CLFSR) instruction reset the error Flag Status Register bits (Erase Error bit, Program Error bit, VPP Error bit, Protection Error bit). It is not necessary to set the WEL bit before the Clear Flag Status Register instruction is executed. The WEL bit will be unchanged after this command is executed. 148/180 N25Q128 - 3 V Figure 89. Clear Flag Status Register instruction sequence QIO-SPI Instructions S 0 C Instruction DQ0 1 DQ1 DQ2 DQ3 Quad_Clear_Flag_SR 9.3.19 Read NV Configuration Register The Read Non Volatile Configuration Register (RDNVCR) instruction allows the Non Volatile Configuration Register to be read. 149/180 Instructions N25Q128 - 3 V Figure 90. Read NV Configuration Register instruction sequence QIO-SPI S 0 C Instruction Nonvolatile Configuration Register Out DQ0 4 0 12 8 1 2 3 4 5 DQ1 5 1 13 9 DQ2 6 2 14 10 DQ3 7 3 15 11 LS Byte MS Byte Quad_Read_NVCR 9.3.20 Write NV Configuration Register The Write Non Volatile Configuration register (WRNVCR) instruction allows new values to be written to the Non Volatile Configuration register. Before it can be accepted, a write enable (WREN) instruction must previously have been executed. Apart form the parallelizing of the instruction code and the input data on the four pins DQ0, DQ1, DQ2 and DQ3, the instruction functionality is exactly the same as the Write Non Volatile Configuration Register (WRNVCR) instruction of the Extended SPI protocol, please refer to Section 9.1.29: Write NV Configuration Register for further details. 150/180 N25Q128 - 3 V Instructions Figure 91. Write NV Configuration Register instruction sequence QIO-SPI S 0 C Instruction Nonvolatile Configuration Register In DQ0 4 0 12 8 1 2 3 4 5 DQ1 5 1 13 9 DQ2 6 2 14 10 DQ3 7 3 15 11 LS Byte MS Byte Quad_Write_NVCR 9.3.21 Read Volatile Configuration Register The Read Volatile Configuration Register (RDVCR) instruction allows the Volatile Configuration Register to be read. 151/180 Instructions N25Q128 - 3 V Figure 92. Read Volatile Configuration Register instruction sequence QIO-SPI S 0 C Instruction DQ0 4 0 4 Volatile Configuration Register Out 0 4 0 4 0 4 0 4 0 4 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 DQ1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 DQ2 6 2 6 2 6 2 6 2 6 2 6 2 6 2 DQ3 7 3 7 3 7 3 7 3 7 3 7 3 7 3 Quad_Read_VCR 9.3.22 Write Volatile Configuration Register The Write Volatile Configuration register (WRVCR) instruction allows new values to be written to the Volatile Configuration register. Before it can be accepted, a write enable (WREN) instruction must previously have been executed. In case of Fast POR, the WREN instruction is not required because a WREN instruction gets the device out from the Fast POR state (See Section 11.1: Fast POR). Apart form the parallelizing of the instruction code and the input data on the four pins DQ0, DQ1, DQ2 and DQ3, the instruction functionality is exactly the same as the Write Volatile Configuration Register (WRVCR) instruction of the Extended SPI protocol, please refer to Section 9.1.31: Write Volatile Configuration Register for further details. 152/180 N25Q128 - 3 V Instructions Figure 93. Write Volatile Configuration Register instruction sequence QIO-SPI S 0 C Volatile Configuration Register In DQ0 4 0 1 2 3 DQ1 5 1 DQ2 6 2 DQ3 7 3 Quad_Write_VCR 9.3.23 Read Volatile Enhanced Configuration Register The Read Volatile Enhanced Configuration Register (RDVECR) instruction allows the Volatile Configuration Register to be read. 153/180 Instructions N25Q128 - 3 V Figure 94. Read Volatile Enhanced Configuration Register instruction sequence QIO-SPI S 0 C Instruction DQ0 4 0 4 0 Volatile Enhanced Configuration Register Out 4 0 4 0 4 0 4 0 4 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 DQ1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 DQ2 6 2 6 2 6 2 6 2 6 2 6 2 6 2 DQ3 7 3 7 3 7 3 7 3 7 3 7 3 7 3 Quad_Read_VECR 9.3.24 Write Volatile Enhanced Configuration Register The Write Volatile Enhanced Configuration register (WRVECR) instruction allows new values to be written to the Volatile Enhanced Configuration register. Before it can be accepted, a write enable (WREN) instruction must previously have been executed. In case of Fast POR the WREN instruction is not required because a WREN instruction gets the device out from the Fast POR state (See Section 11.1: Fast POR). Apart form the parallelizing of the instruction code and the input data on the four pins DQ0, DQ1, DQ2 and DQ3, the instruction functionality is exactly the same as the Write Volatile Enhanced Configuration Register (WRVECR) instruction of the Extended SPI protocol, please refer to Section 9.1.33: Write Volatile Enhanced Configuration Register for further details. 154/180 N25Q128 - 3 V Instructions Figure 95. Write Volatile Enhanced Configuration Register instruction sequence QIO-SPI S 0 C Instruction DQ0 Volatile Enhanced Configuration Register In 4 0 1 2 3 DQ1 5 1 DQ2 6 2 DQ3 7 3 Quad_Write_VECR 155/180 XIP Operations N25Q128 - 3 V 10 XIP Operations XIP (eXecution in Place) mode is available in each protocol: Extended SPI, DIO-SPI, and QIO-SPI. XIP mode allows the memory to be read simply by sending an address to the device and then receiving the data on one, two, or four pins in parallel, depending on the customer requirements. It offers maximum flexibility to the application, saves instruction overhead, and allows a dramatic reduction to the Random Access time. You can enable XIP mode in two ways: Using the Volatile Configuration Register: this is dedicated to applications that boot in SPI mode (Extended SPI, DIO-SPI or QIO-SPI) and then during the application life need to switch to XIP mode to directly execute some code in the flash. Using the Non Volatile Configuration Register: this is dedicated to applications that need to boot directly in XIP mode. Setting to 0 the bit 3 of the Volatile Configuration Register the device is ready to enter in XIP mode right after the next fast read instruction (by 1, 2 or 4 pin). While acting on the Non Volatile Configuration Register (bit 11 to bit 9, depending on which XIP type is required, single, dual or quad I/O) the memory enters in the selected XIP mode only after the next power-on sequence. The Non Volatile Configuration Register XIP configuration bits allows the memory to start directly in the required XIP mode (Single, Dual or Quad) after the power on. The XIP mode status must be confirmed forcing the XIP confirmation bit to "0", the XIP confirmation bit is the value on the DQ0 pin during the first dummy clock cycle after the address in XIP reading instruction. Forcing the bit "1" on DQ0 during the first dummy clock cycle after the address (XIP Confirmation bit) the memory returns in the previous standard read mode, that means it will codify as an instruction code the next byte received on the input pin(s) after the next chip select. Instead, if the XIP mode is confirmed (by forcing the XIP confirmation bit to 0), after the device next de-selection and selection cycle, the memory codify the first 3 bytes received on the inputs pin(s) as a new address. Besides not confirming the XIP mode during the first dummy clock cycle, it is possible to exit the XIP mode by mean of a dedicated rescue sequence. Note: For devices with a feature set digit equal to 2 or 4 in the part number (Basic XiP), it is not necessary to set the Volatile Configuration Register bit 3 to enter XIP mode: it is possible to enter XIP mode directly by setting XIP Confirmation bit to 1 during the first dummy clock cycle after a fast read instruction.See Section 16: Ordering information. 156/180 N25Q128 - 3 V Figure 96. N25Q128 Read functionality Flow Chart XIP Operations Power On NVCR Check Is XIP enabled ? No SPI standard mode (no XiP, VCR = 1) VCR = 0 ? Yes SPI mode (no XIP) but ready to enter XIP Yes No No XIP mode Read Instructions ? Yes Yes No XiP Confirmation bit = 0 ? No XiP Confirmation bit = 0 ? Yes 10.1 Enter XIP mode by setting the Non Volatile Configuration Register To use the Non Volatile Configuration Register method to enter in XIP mode it is necessary to set the Non Volatile Configuration Register bits from 11 to 9 with the pattern corresponding to the required XIP mode by mean of the Write Non Volatile Configuration Register (WRNVCR) instruction. (See Table 24.: NVCR XIP bits setting example.) This instruction doesn't affect the XIP state until the next Power on sequence. In this case, after the next power on sequence, the memory directly accept addresses and then, after the dummy clock cycles (configurable), outputs the data as described in Table 24.: NVCR XIP bits setting example. For example to enable fast POR and XIP on QIOFR in normal SPI protocol with six dummy clock cycles the following pattern must be issued: 157/180 XIP Operations Table 24. B1h (WRNVCR opcode) N25Q128 - 3 V NVCR XIP bits setting example + 0110 6 dummy cycles for fast read instructions XIP set as default; Quad I/O mode Output Buffer driver strength default FAST POR enabled Hold/Reset not disabled Extended SPI protocol Don’t Care 100 111 0 1 11 xx Figure 97. XIP mode directly after power on NVCR check: XIP enabled Vd tVSI (
N25Q128A23E12H0G 价格&库存

很抱歉,暂时无法提供与“N25Q128A23E12H0G”相匹配的价格&库存,您可以联系我们找货

免费人工找货