4KB Parameter Sector Usage on FS-S NOR Flash - KBA225181

Author: Vincenth_06          Version: **

 

Question:

How can I configure 4KB parameter sectors on FS-S NOR flash devices? Can I disable the 4KB parameter sectors? What are the differences between the 4KB parameter sectors and the normal 64KB/256KB sectors?

 

Answer:

The 4KB parameter sectors on Cypress’ FS-S NOR flash implement a flexible architecture, which can provide:

  • Fine granularity for small density data storage on flash (for example: parameters, tags, or flags), which can avoid waste of space
  • Erase time cost for 4KB sectors is less than the normal 64KB/256KB sectors

FS-S series NOR flash provides 8*4KB parameter sectors on each chip. You can decide where to place the 4KB parameter sectors  (bottom or top address of the flash), and whether to just disable them. The typical configurations are illustrated in the following figure.

Figure 1. Typical 4KB Parameter Sector Configurations on FS-S NOR Flash

To change the location of the 4KB parameter sectors or disable it, you can use the command WRAR(71h) to program CR1NV or CR3NV with corresponding addresses and read the values out by using RDAR(65h) command. The addresses of these registers are listed in the following tables:  1.png

To change the location of the 4KB parameter sectors or disable it, you can use the command WRAR(71h) to program CR1NV or CR3NV with corresponding addresses and read the values out by using RDAR(65h) command. The addresses of these registers are listed in the following tables:

Table 2. FS-S NOR Flash Nonvolatile Status and Configuration Registers Address Map

Byte Address (Hex)

Register Name

Description

00000000

SR1NV

Non-Volatile Status and Configuration Registers

00000001

N/A

00000002

CR1NV

00000003

CR2NV

00000004

CR3NV

00000005

CR4NV

 

The 8*4KB parameter sectors are additional physical area and will overlap and reuse the address with the 64KB/256KB sectors in the main array. These 4KB parameter sectors will use flash address 0x00_0000 to 0x00_7FFFto access by default.

When you are using flash programmer to burn the image starting from the bottom address of the flash (with default configuration), the first 32KB data will be programmed on the 8*4KB parameter sectors other than space of the first 64KB/256KB sector. If you change the 4KB parameter sectors settings unexpectedly, the data on the first 32KB address (0x00_0000 to 0x00_7FFF) will be missing or will overlap with other useful data:

Example 1: If the entire flash array is programmed with default configuration (CR1NV[2](TBPARM_O)=0, CR3NV[3](20h_NV)=0, 8*4KB parameter sectors on the bottom side, and later CR1NV[2](TBPARM_O) is changed from 0 to 1, the data programmed on the 8*4KB parameter sectors will overlap the data at the end of the flash. See Figure 2.

Figure 2. Data Overlap while Changing 4KB Parameter Sectors Configurations

2.png

Example 2: If the entire flash array is programmed with default configuration (CR1NV[2](TBPARM_O)=0, CR3NV[3](20h_NV)=0, 8*4KB parameter sectors on the bottom side), and later CR3NV[3](20h_NV) is changed from 0 to 1 to disable the parameter sectors, the data programmed on the 8*4KB parameter sectors will be gone. See Figure 3.

Figure 3. Missing Data while Changing 4KB Parameter Sectors Configurations

3.png

You should be careful to change the 4KB parameter sectors configuration when the useful data is already on flash. The desired state of TBPARM_O must be selected during the initial configuration of the device during system manufacture; before the first program or erase operation on the main flash array. TBPARM_O must not be programmed after programming or erasing is done in the main flash array.

Besides, the erase operation of 4KB parameter sectors is different with normal 64KB/256KB sectors. To improve the erase efficiency, Cypress provides dedicated erase commands for 4KB parameter sectors. The erase commands differences are listed following the following table.

Table 2. FS-S NOR Flash Erase Commands Differences List

Erase Commands

Effect on 4KB Parameter Sectors

Effect on 64KB/256KB Sectors

4KB Sector Erase: P4E(20h) or 4P4E(21h)

Y

N

Sector Erase: SE(D8h) or 4SE(DCh)

N

Y

Bulk Erase: BE(60h) or 4BE(C7h)

Y

Y

 

Ensure that the erase commands fit with the corresponding sectors.

If you want to use the FS-S series NOR flash devices with Linux, note that the current Linux MTD driver only supports uniform sector size. For more information, refer to  S25FS-S Support Under Linux - KBA218975

Note for FS01GS Devices:

This device consists of dual FS512S die stacks, in which the 4KB parameter sectors exist at the bottom address by default. The 4KB parameter sectors may optionally be located only at the bottom or top of the entire 1-Gbit address space. The valid combinations of these two configuration bits are shown in the following table:

Table 3. FS01GS 4KB parameter sectors configurations options

Device

Lower FS512S

Upper FS512S

Parameter Sectors Location

CR1NV[2]( TBPARM_O)

CR3NV[3]( 20h_NV)

CR1NV[2]( TBPARM_O)

CR3NV[3]( 20h_NV)

None (Uniform Sectors)

X

1

X

1

Bottom

0

0

X

1

Top

X

1

1

0

Default Configuration

0

0

0

0