wire / wire-format / spi-flash
SPI flash (NOR flash) is accessed via SPI bus. Commands: 0x03 (Read Data), 0x0B (Fast Read), 0x02 (Page Program), 0x20 (Sector Erase 4KB), 0x52 (Block Erase 32KB), 0xD8 (Block Erase 64KB), 0xC7/0x60 (Chip Erase), 0x05 (Read Status Register), 0x01 (Write Status Register), 0x06 (Write Enable), 0x04 (Write Disable), 0x9F (Read JEDEC ID), 0x90 (Read Manufacturer/Device ID). Page size: 256 bytes. Sector size: 4KB. Block size: 32KB/64KB.
aka: SPI flash (NOR flash) protocol
spec: SPI flash (JEDEC)
SPI flash (NOR flash) is accessed via SPI bus. Commands: 0x03 (Read Data), 0x0B (Fast Read), 0x02 (Page Program), 0x20 (Sector Erase 4KB), 0x52 (Block Erase 32KB), 0xD8 (Block Erase 64KB), 0xC7/0x60 (Chip Erase), 0x05 (Read Status Register), 0x01 (Write Status Register), 0x06 (Write Enable), 0x04 (Write Disable), 0x9F (Read JEDEC ID), 0x90 (Read Manufacturer/Device ID). Page size: 256 bytes. Sector size: 4KB. Block size: 32KB/64KB.
| field | size | meaning |
|---|---|---|
| Read Data (0x03) | command | 0x03 + 3-byte address. Returns data at 1x speed. |
| Fast Read (0x0B) | command | 0x0B + 3-byte address + 1 dummy byte. Returns data at higher speed. |
| Page Program (0x02) | command | 0x02 + 3-byte address + up to 256 bytes data. Writes one page (must erase first). |
| Sector Erase (0x20) | command | 0x20 + 3-byte address. Erases 4KB sector (sets all bits to 1). |
| Block Erase (0xD8) | command | 0xD8 + 3-byte address. Erases 64KB block. |
| Chip Erase (0xC7) | command | 0xC7 (or 0x60). Erases entire chip. |
| Read Status (0x05) | command | 0x05. Returns status register: WIP (write in progress), WEL (write enable latch), BP (block protect), etc. |
| Write Enable (0x06) | command | 0x06. Sets WEL bit. Required before program/erase. |
| Read JEDEC ID (0x9F) | command | 0x9F. Returns manufacturer ID (1 byte), device ID (2 bytes), capacity (1 byte). |
| Page size | 256 bytes | Minimum write unit. Must erase sector before writing. |
| Sector size | 4KB | Minimum erase unit. |
example:
9f 00 00 00
SPI flash: Read JEDEC ID command (0x9F)
agent: curl -H 'accept: application/json' wire.phall.io/wire-format/spi-flash
or /wire-format/spi-flash.json