Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

typedef struct fs_dev_nor_cfg {

...

    CPU_ADDR            AddrBase;

...

 
    CPU_INT08U          RegionNbr;

...

 
    CPU_ADDR            AddrStart;

...

 
    CPU_INT32U          DevSize;

...

 
    FS_SEC_SIZE         SecSize;

...

 
    CPU_INT08U          PctRsvd;

...

 
    CPU_INT16U          EraseCntDiffTh;

...

 
    FS_DEV_NOR_PHY_API *PhyPtr;

...

 
    CPU_INT08U          BusWidth;

...

 
    CPU_INT08U          BusWidthMax;

...

 
    CPU_INT08U          PhyDevCnt;

...

 
    CPU_INT32U          MaxClkFreq;

...

 
  } FS_DEV_NOR_CFG;

...

File

...

...

Used for

...

...

fs_dev_nor.h

...

Second argument of FSDev_Open() (when opening a NOR device)

Anchor10952141095214Configures the properties of a NOR device that will be opened. A pointer to this structure is passed as the second argument of FSDev_Open() for a NOR device.anchor10952151095215

Members

...

AddrBase Anchor10991911099191

must specify

...

...

1. the base address of the NOR flash memory, for a parallel NOR.

...

...

2. 0x00000000 for a serial NOR.

...

RegionNbr Anchor10991941099194

must specify the block region which will be used for the file system area. Block regions are enumerated by the physical-layer driver; for more information, see the physical-layer driver header file. (on monolithic devices, devices with only one block region, this must be 0).

...

10952201095220AddrStart Anchor10991951099195

must specify

...

1. the absolute start address of the file system area in the NOR flash memory, for a paralel NOR.

...

2. the offset of the start of the file system in the NOR flash, for a serial NOR.

...

...

The address specified by AddrStart must lie within the region RegionNbr.

Anchor10952241095224DevSize Anchor10991991099199

must specify the number of octets that will belong to the file system area.

...

SecSize Anchor10992001099200

must specify the sector size for the NOR flash (either 512, 1024, 2048 or 4096).

Anchor10952261095226PctRsvd Anchor10992011099201

must specify the percentage of sectors on the NOR flash that will be reserved for extra-file system storage (to improve efficiency). This value must be between 5% and 35%, except if 0 is specified whereupon the default will be used (10%).

...

EraseCntDiffTh Anchor10992021099202

must specify the difference between minimum and maximum erase counts that will trigger passive wear-leveling. This value must be between 5 and 100, except if 0 is specified whereupon the default will be used (20).

Anchor10952281095228PhyPtranchor10992031099203

must point to the appropriate physical-layer driver:

...

classWebWorks_Indent_1

...

...

FSDev_NOR_AMD_1x08

...

classWebWorks_Indent_2

...

CFI-compatible parallel NOR implementing AMD command set, 8-bit data bus.

...

...

FSDev_NOR_AMD_1x16

...

classWebWorks_Indent_2

...

...

CFI-compatible parallel NOR implementing AMD command set, 16-bit data bus.

...

classWebWorks_Indent_1

...

FSDev_NOR_Intel_1x16

...

...

CFI-compatible parallel NOR implementing Intel command set, 16-bit data bus

...

classWebWorks_Indent_1

...

FSDev_NOR_SST39

...

classWebWorks_Indent_2

...

SST SST39 Multi-Purpose Flash

...

...

FSDev_NOR_STM25

...

classWebWorks_Indent_2

...

ST M25 serial flash

...

...

classWebWorks_Indent_1

...

FSDev_NOR_SST25

...

classWebWorks_Indent_2

...

...

SST SST25 serial flash

...

...

Other

...

...

User-developed

...


For a parallel NOR, the bus configuration is specified via BusWidth, BusWidthMax and PhyDevCnt:

...

BusWidthanchor10992121099212

is the bus width, in bits, between the MCU/MPU and each connected device.

...

1095238BusWidthMax Anchor10992131099213

is the maximum width supported by each connected device.

...

PhyDevCntanchor10992141099214

is the number of devices interleaved on the bus.

...

For a serial flash, the maximum clock frequency is specified via MaxClkFreq.

...

Notes

...

None.