Hardware - Parallel NOR

Parallel NOR devices typically connect to a host MCU/MPU via an external bus interface (EBI), with an 8- or 16-bit data lines and 20 or more address lines (depending on the device size). Many silicon vendors offer parallel NOR product lines; most devices currently marketed are conformant to the Common Flash Interface (CFI). A set of query information allows the μC/FS NOR driver physical-layer drivers to interface with almost any NOR flash without configuration or modification. The standard query information provides the following details:

  • Command set. Three different command sets are common: Intel, AMD and SST. All three are supported.
  • Geometry. A device is composed of one or more regions of identically-sized erase blocks. Uniform devices contain only one region. Boot-block devices often have one or two regions of small blocks for code storage at the top or bottom of the device. All of these are supported by the NOR driver.

Table - CFI query information

Offset

Length (Bytes)

Contents

0x10

1

Query string “Q”

0x11

1

Query string “R”

0x12

1

Query string “Y”

0x13

2

Command set

0x27

1

Device size, in bytes = 2n

0x2A

2

Maximum number of bytes in multi-byte write = 2N

0x2C

1

Number of erase block regions = m

0x2D

2

Region 1: Number of erase blocks = x + 1

0x2F

2

Region 1: Size of each erase block = y * 256 (bytes)

0x31

2

Region 2: Number of erase blocks = x + 1

0x33

2

Region 2: Size of each erase block = y * 256 (bytes)

.
.
.

0x2D + (m-1) * 4

2

Region m: Number of erase blocks = x + 1

0x2F + (m-1) * 4

2

Region m: Size of each erase block = y * 256 (bytes)



Table - CFI query information gives the format of CFI query information. The first three bytes should constitute the marker string “QRY”, by which the retrieval of correct parameters is verified. A two-byte command set identifier follows; this must match the identifier for the command set supported by the physical-layer driver. Beyond is the geometry information: the device size, the number of erase block regions, and the size and number of blocks in each region. For most flash, these regions are contiguous and sequential, the first at the beginning of the device, the second just after. Since this is not always true (see FSDev_NOR_SST39 for an example), the manufacturer’s information should always be checked and, for atypical devices, the physical-layer driver copied to the application directory and modified.

Command Set Identifier

Description

0x0001

Intel

0x0002

AMD/Spansion

0x0003

Intel

0x0102

SST