CMSIS Driver  Version 1.10 - Preliminary
Middleware Driver API for microcontroller peripherals
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
NAND Interface

Driver API for NAND Flash Device Interface (Driver_NAND.h) More...

Data Structures

struct  ARM_DRIVER_NAND
 Access structure of the NAND Driver. More...
 
struct  ARM_NAND_CAPABILITIES
 NAND Driver Capabilities. More...
 
struct  ARM_NAND_DEVICE
 NAND Flash Device information. More...
 
struct  ARM_NAND_PAGE_LAYOUT
 NAND Page Layout configuration. More...
 
struct  ARM_NAND_PAGE_LAYOUT.spare
 

Typedefs

typedef void(* ARM_NAND_SignalEvent_t )(uint32_t dev_num)
 Pointer to ARM_NAND_SignalEvent : Signal NAND Event.
 

Enumerations

enum  ARM_NAND_STATUS {
  ARM_NAND_OK = 0,
  ARM_NAND_ECC_CORRECTED = 1,
  ARM_NAND_ECC_FAILED = 2,
  ARM_NAND_PROGRAM_FAILED = 3,
  ARM_NAND_ERASE_FAILED = 4,
  ARM_NAND_TIMEOUT = 5,
  ARM_NAND_UNSUPPORTED = 6,
  ARM_NAND_ERROR = 7
}
 NAND Flash Driver Status. More...
 
enum  ARM_NAND_TYPE {
  ARM_NAND_TYPE_RAW_NAND = 0,
  ARM_NAND_TYPE_EZ_NAND = 1,
  ARM_NAND_TYPE_ONENAND = 2
}
 NAND Flash Device Type. More...
 
enum  ARM_NAND_COMMAND {
  ARM_NAND_CMD_READ_1ST = 0x00,
  ARM_NAND_CMD_CHANGE_RD_COL_1ST = 0x05,
  ARM_NAND_CMD_PROGRAM_2ND = 0x10,
  ARM_NAND_CMD_READ_2ND = 0x30,
  ARM_NAND_CMD_ERASE_1ST = 0x60,
  ARM_NAND_CMD_STATUS = 0x70,
  ARM_NAND_CMD_PROGRAM_1ST = 0x80,
  ARM_NAND_CMD_CHANGE_WR_COL = 0x85,
  ARM_NAND_CMD_READ_ID = 0x90,
  ARM_NAND_CMD_ERASE_2ND = 0xD0,
  ARM_NAND_CMD_CHANGE_RD_COL_2ND = 0xE0,
  ARM_NAND_CMD_READ_PARAM_PAGE = 0xEC,
  ARM_NAND_CMD_RESET = 0xFF
}
 Mandatory NAND Flash Commands (ONFI V1.0 or higher) More...
 
enum  ARM_NAND_COMMAND_OPTIONAL {
  ARM_NAND_CMD_COPYBACK_READ_1ST = 0x00,
  ARM_NAND_CMD_COPYBACK_READ_2ND = 0x35,
  ARM_NAND_CMD_READ_CACHE_SEQUENTIAL = 0x31,
  ARM_NAND_CMD_READ_CACHE_END = 0x3F,
  ARM_NAND_CMD_READ_STATUS_ENHANCED = 0x78,
  ARM_NAND_CMD_PAGE_CACHE_PROGRAM_1ST = 0x80,
  ARM_NAND_CMD_PAGE_CACHE_PROGRAM_2ND = 0x15,
  ARM_NAND_CMD_COPYBACK_PROGRAM_1ST = 0x85,
  ARM_NAND_CMD_COPYBACK_PROGRAM_2ND = 0x10,
  ARM_NAND_CMD_READ_UNIQUE_ID = 0xED,
  ARM_NAND_CMD_GET_FEATURES = 0xEE,
  ARM_NAND_CMD_SET_FEATURES = 0xEF
}
 Optional NAND Flash Commands (ONFI V1.0 or higher) More...
 

Functions

ARM_DRV_VERSION ARM_NAND_GetVersion (void)
 Get driver version.
 
ARM_NAND_CAPABILITIES ARM_NAND_GetCapabilities (void)
 Get driver capabilities.
 
ARM_NAND_STATUS ARM_NAND_Initialize (ARM_NAND_SignalEvent_t cb_event, ARM_NAND_DEVICE *ptr_device, uint32_t num_devices)
 Initialize NAND Interface.
 
ARM_NAND_STATUS ARM_NAND_Uninitialize (void)
 De-initialize NAND Interface.
 
ARM_NAND_STATUS ARM_NAND_PowerControl (ARM_POWER_STATE state)
 Control the NAND interface power.
 
ARM_NAND_STATUS ARM_NAND_ResetDevice (uint32_t dev_num)
 Reset a NAND device.
 
ARM_NAND_STATUS ARM_NAND_ReadID (uint32_t dev_num, uint8_t addr, uint8_t *buf, uint32_t len)
 Read NAND device ID.
 
ARM_NAND_STATUS ARM_NAND_ReadParamPage (uint32_t dev_num, uint32_t col, uint8_t *buf, uint32_t len)
 Read NAND parameter page.
 
ARM_NAND_STATUS ARM_NAND_ReadPage (uint32_t dev_num, uint32_t row, uint32_t col, uint8_t *buf, uint32_t len)
 Read data from NAND page.
 
ARM_NAND_STATUS ARM_NAND_WritePage (uint32_t dev_num, uint32_t row, uint32_t col, const uint8_t *buf, uint32_t len)
 Write data to NAND page.
 
ARM_NAND_STATUS ARM_NAND_CopyPage (uint32_t dev_num, uint32_t row_src, uint32_t row_dst, uint32_t row_cnt)
 Copy pages within NAND device.
 
ARM_NAND_STATUS ARM_NAND_EraseBlock (uint32_t dev_num, uint32_t row)
 Erase blocks in NAND device.
 
ARM_NAND_STATUS ARM_NAND_ReadStatus (uint32_t dev_num, uint8_t *stat)
 Read NAND device status.
 
void ARM_NAND_SignalEvent (uint32_t dev_num)
 Signal NAND event. Callback function.
 

Description

Driver API for NAND Flash Device Interface (Driver_NAND.h)

NAND devices are a type of non-volatile storage and do not require power to hold data. NAND devices, such as hard disks or memory cards, are accessed in blocks. Each block consists of a number of pages. Refer to ARM_NAND_PAGE_LAYOUT for details. Wikipedia offers more information about the Flash Memories, including NAND.

NAND Structure

 

NAND_Schematics.png
Simplified NAND Flash Schematic

 

NAND API

The following header files define the Application Programming Interface (API) for the NAND interface:

The driver implementation is a typical part of the Device Family Pack (DFP) that supports the peripherals of the microcontroller family.

Driver Functions

The driver functions are published in the access struct as explained in Driver Functions

A typical setup sequence for the driver is shown below:

Example Code:


Data Structure Documentation

struct ARM_DRIVER_NAND

Access structure of the NAND Driver.

The functions of the NAND driver are accessed by function pointers exposed by this structure. Refer to Driver Functions for overview information.

Each instance of an NAND interface provides such an access structure. The instance is identified by a postfix number in the symbol name of the access structure, for example:

  • ARM_DRIVER_NAND0 is the name of the access struct of the first instance (no. 0).
  • ARM_DRIVER_NAND1 is the name of the access struct of the second instance (no. 1).

A middleware configuration setting allows connecting the middleware to a specific driver instance ARM_DRIVER_NANDn. The default is 0, which connects a middleware to the first instance of a driver.

Data Fields

ARM_DRV_VERSION(* GetVersion )(void)
 Pointer to ARM_NAND_GetVersion : Get driver version.
 
ARM_NAND_CAPABILITIES(* GetCapabilities )(void)
 Pointer to ARM_NAND_GetCapabilities : Get driver capabilities.
 
ARM_NAND_STATUS(* Initialize )(ARM_NAND_SignalEvent_t cb_event, ARM_NAND_DEVICE *ptr_device, uint32_t num_devices)
 Pointer to ARM_NAND_Initialize : Initialize NAND Interface.
 
ARM_NAND_STATUS(* Uninitialize )(void)
 Pointer to ARM_NAND_Uninitialize : De-initialize NAND Interface.
 
ARM_NAND_STATUS(* PowerControl )(ARM_POWER_STATE state)
 Pointer to ARM_NAND_PowerControl : Control NAND Interface Power.
 
ARM_NAND_STATUS(* ResetDevice )(uint32_t dev_num)
 Pointer to ARM_NAND_ResetDevice : Reset NAND Device.
 
ARM_NAND_STATUS(* ReadID )(uint32_t dev_num, uint8_t addr, uint8_t *buf, uint32_t len)
 Pointer to ARM_NAND_ReadID : Read Device ID from NAND.
 
ARM_NAND_STATUS(* ReadParamPage )(uint32_t dev_num, uint32_t col, uint8_t *buf, uint32_t len)
 Pointer to ARM_NAND_ReadParamPage : Read parameter page from NAND.
 
ARM_NAND_STATUS(* ReadPage )(uint32_t dev_num, uint32_t row, uint32_t col, uint8_t *buf, uint32_t len)
 Pointer to ARM_NAND_ReadPage : Read data from NAND Page.
 
ARM_NAND_STATUS(* WritePage )(uint32_t dev_num, uint32_t row, uint32_t col, const uint8_t *buf, uint32_t len)
 Pointer to ARM_NAND_WritePage : Write data to NAND Page.
 
ARM_NAND_STATUS(* CopyPage )(uint32_t dev_num, uint32_t row_src, uint32_t row_dst, uint32_t row_cnt)
 Pointer to ARM_NAND_CopyPage : Copy pages in NAND Device.
 
ARM_NAND_STATUS(* EraseBlock )(uint32_t dev_num, uint32_t row)
 Pointer to ARM_NAND_EraseBlock : Erase block in NAND Device.
 
ARM_NAND_STATUS(* ReadStatus )(uint32_t dev_num, uint8_t *stat)
 Pointer to ARM_NAND_ReadStatus : Read Device status from NAND.
 

Field Documentation

ARM_NAND_STATUS(* CopyPage)(uint32_t dev_num, uint32_t row_src, uint32_t row_dst, uint32_t row_cnt)

Pointer to ARM_NAND_CopyPage : Copy pages in NAND Device.

ARM_NAND_STATUS(* EraseBlock)(uint32_t dev_num, uint32_t row)

Pointer to ARM_NAND_EraseBlock : Erase block in NAND Device.

ARM_NAND_CAPABILITIES(* GetCapabilities)(void)

Pointer to ARM_NAND_GetCapabilities : Get driver capabilities.

ARM_DRV_VERSION(* GetVersion)(void)

Pointer to ARM_NAND_GetVersion : Get driver version.

ARM_NAND_STATUS(* Initialize)(ARM_NAND_SignalEvent_t cb_event, ARM_NAND_DEVICE *ptr_device, uint32_t num_devices)

Pointer to ARM_NAND_Initialize : Initialize NAND Interface.

ARM_NAND_STATUS(* PowerControl)(ARM_POWER_STATE state)

Pointer to ARM_NAND_PowerControl : Control NAND Interface Power.

ARM_NAND_STATUS(* ReadID)(uint32_t dev_num, uint8_t addr, uint8_t *buf, uint32_t len)

Pointer to ARM_NAND_ReadID : Read Device ID from NAND.

ARM_NAND_STATUS(* ReadPage)(uint32_t dev_num, uint32_t row, uint32_t col, uint8_t *buf, uint32_t len)

Pointer to ARM_NAND_ReadPage : Read data from NAND Page.

ARM_NAND_STATUS(* ReadParamPage)(uint32_t dev_num, uint32_t col, uint8_t *buf, uint32_t len)

Pointer to ARM_NAND_ReadParamPage : Read parameter page from NAND.

ARM_NAND_STATUS(* ReadStatus)(uint32_t dev_num, uint8_t *stat)

Pointer to ARM_NAND_ReadStatus : Read Device status from NAND.

ARM_NAND_STATUS(* ResetDevice)(uint32_t dev_num)

Pointer to ARM_NAND_ResetDevice : Reset NAND Device.

ARM_NAND_STATUS(* Uninitialize)(void)

Pointer to ARM_NAND_Uninitialize : De-initialize NAND Interface.

ARM_NAND_STATUS(* WritePage)(uint32_t dev_num, uint32_t row, uint32_t col, const uint8_t *buf, uint32_t len)

Pointer to ARM_NAND_WritePage : Write data to NAND Page.

struct ARM_NAND_CAPABILITIES

NAND Driver Capabilities.

An NAND driver can be implemented with different capabilities. The bitfield members of this struct encode the capabilities implemented by this driver.

Returned by:

Data Fields
uint32_t ecc_mlc: 1 Supports ECC for MLC NAND.
uint32_t ecc_slc: 1 Supports ECC for SLC NAND.
uint32_t events: 1 Signals events.
uint32_t one_nand: 1 Supports OneNAND Interface.
uint32_t raw_nand: 1 Supports NAND Interface.
uint32_t reserved: 27 reserved for future extension
struct ARM_NAND_DEVICE

NAND Flash Device information.

Stores the characteristics of a NAND Flash device. This includes the page layout configuration, NAND type, device number (chip select), number of blocks, pages, sectors, and error correction code.

Parameter for:

Data Fields
uint32_t block_count Number of Blocks in Device.
uint16_t block_sectors Number of Sectors per Block.
uint8_t col_cycles Number of Column address cycles.
uint8_t device_number Device number (chip select)
uint16_t page_count Number of Pages per Block.
ARM_NAND_PAGE_LAYOUT * page_layout Page Layout configuration.
uint8_t page_sectors Number of Sectors per Page.
uint16_t page_size Page Size in bytes.
uint8_t row_cycles Number of Row address cycles.
uint8_t sw_ecc value > 0: error correction code (ECC) encoding/decoding enabled in software:
value = 0: Software ECC disabled
value = 1: Hamming ECC algorithm enabled in software.
uint8_t type ARM_NAND_TYPE
struct ARM_NAND_PAGE_LAYOUT

NAND Page Layout configuration.

Stores the default NAND page layout definition (with sector_inc, spare_inc, and spare_ofs), which contains a Spare area after each sector. The struct ARM_NAND_PAGE_LAYOUT.spare defines the Spare area layout.

The page size is defined as the sum of User area plus Spare area. Each page has a small number of associated "spare" bytes (typically 1/32 of the data size) to store the Error Correction Algorithms (ECC).

The following standard page sizes are available:

Page SizeUser + Spare Area
528 512 + 16 bytes
2112 2048 + 64 bytes
4224 4096 + 128 bytes
8448 8192 + 256 bytes
NAND_PageLayout.png
Default Page Layout

 

NAND_SpareArea.png
Organization of the default 16-byte Spare area

NAND devices require bad block management by the driver software or by a separate controller chip. For example, SD cards have mechanisms that execute wear leveling and bad block management. The memory capacity shrinks as more blocks are marked bad. The block size is a value specified as amount of flash pages.

The following block sizes are available:

Block SizePages
8 8
16 16
32 32
64 64
128 128
256 256
Note
NAND chip manufacturers document the order in which pages can be written. Typically, single pages of an erase block must be written in sequential order starting from the first. Random-order writes are prohibited or unspecified.

Parameter for:

Data Fields
uint16_t sector_inc Column increment till next sector. If page contains multiple sectors, then the first sector always starts at the beginning of the page (byte zero). Second sector starts at sect_inc, third sector at (sect_inc + sect_inc) and so on.
struct ARM_NAND_PAGE_LAYOUT spare Structure spare.
uint16_t spare_inc Column increment till next spare. If page contains multiple sectors, then the first byte of the first spare area is determined by reading spare_ofs value. Location of the first byte of the second spare is (spare_inc + spare_ofs).
uint16_t spare_ofs Spare area offset from beginning of the page.
struct ARM_NAND_PAGE_LAYOUT.spare
Data Fields
uint8_t ofs_bbm Bad Block marker position. Is usually placed as the 6-th byte of Spare and has the value 5.
uint8_t ofs_dcm Page Data corrupted marker. Usually, this byte is the 5-th byte of Spare and has the value 4.
uint8_t ofs_ecc Position of the first byte of Error Correction Code (ECC). Is usually the 7-th byte of Spare and has the value 6. This value is used by flash translation layer only if ECC is encoded and decoded in software.
uint8_t ofs_lsn LSN position, where logical sector number (LSN) is placed. Usually, this is the first byte of Spare and has the value 0. LSN is a 32-bit value.

Typedef Documentation

ARM_NAND_SignalEvent_t

Pointer to ARM_NAND_SignalEvent : Signal NAND Event.

Provides the typedef for the callback function ARM_NAND_SignalEvent.

Parameter for:

Enumeration Type Documentation

Mandatory NAND Flash Commands (ONFI V1.0 or higher)

NAND Flash Commands (ONFI V1.0 and V2.2 mandatory)

Enumerator:
ARM_NAND_CMD_READ_1ST 

Read 1st Cycle.

ARM_NAND_CMD_CHANGE_RD_COL_1ST 

Change Read Column 1st Cycle.

ARM_NAND_CMD_PROGRAM_2ND 

Page Program 2nd Cycle.

ARM_NAND_CMD_READ_2ND 

Read 2nd Cycle.

ARM_NAND_CMD_ERASE_1ST 

Block Erase 1st Cycle.

ARM_NAND_CMD_STATUS 

Read Status.

ARM_NAND_CMD_PROGRAM_1ST 

Page Program 1st Cycle.

ARM_NAND_CMD_CHANGE_WR_COL 

Change Write Column.

ARM_NAND_CMD_READ_ID 

Read ID.

ARM_NAND_CMD_ERASE_2ND 

Block Erase 2nd cycle.

ARM_NAND_CMD_CHANGE_RD_COL_2ND 

Change Read Column 2nd Cycle.

ARM_NAND_CMD_READ_PARAM_PAGE 

Read Parameter Page.

ARM_NAND_CMD_RESET 

Reset Command.

Optional NAND Flash Commands (ONFI V1.0 or higher)

Provides standardized values for optional NAND commands.

Enumerator:
ARM_NAND_CMD_COPYBACK_READ_1ST 

Copyback Read 1st Cycle.

ARM_NAND_CMD_COPYBACK_READ_2ND 

Copyback Read 2nd Cycle.

ARM_NAND_CMD_READ_CACHE_SEQUENTIAL 

Read Cache Sequential.

ARM_NAND_CMD_READ_CACHE_END 

Read Cache End.

ARM_NAND_CMD_READ_STATUS_ENHANCED 

Read Status Enhanced.

ARM_NAND_CMD_PAGE_CACHE_PROGRAM_1ST 

Page Cache Program 1st Cycle.

ARM_NAND_CMD_PAGE_CACHE_PROGRAM_2ND 

Page Cache Program 2nd Cycle.

ARM_NAND_CMD_COPYBACK_PROGRAM_1ST 

Copyback Program 1st Cycle.

ARM_NAND_CMD_COPYBACK_PROGRAM_2ND 

Copyback Program 2nd Cycle.

ARM_NAND_CMD_READ_UNIQUE_ID 

Read Unique ID.

ARM_NAND_CMD_GET_FEATURES 

Get Features.

ARM_NAND_CMD_SET_FEATURES 

Set Features.

NAND Flash Driver Status.

Defines status and error codes returned by most of the NAND driver functions.

Returned by:

Enumerator:
ARM_NAND_OK 

No error.

ARM_NAND_ECC_CORRECTED 

ECC corrected the data.

ARM_NAND_ECC_FAILED 

ECC could not correct the data.

ARM_NAND_PROGRAM_FAILED 

Programming failed.

ARM_NAND_ERASE_FAILED 

Erase verify failed.

ARM_NAND_TIMEOUT 

NAND hardware timeout.

ARM_NAND_UNSUPPORTED 

Functionality not supported.

ARM_NAND_ERROR 

Unspecified error.

NAND Flash Device Type.

Provides standardized values for defining the NAND type.

Parameter for -ARM_NAND_DEVICE structure

Enumerator:
ARM_NAND_TYPE_RAW_NAND 

Raw NAND Flash device.

ARM_NAND_TYPE_EZ_NAND 

NAND Flash device with integrated ECC.

ARM_NAND_TYPE_ONENAND 

OneNAND Flash device.

Function Documentation

ARM_NAND_STATUS ARM_NAND_CopyPage ( uint32_t  dev_num,
uint32_t  row_src,
uint32_t  row_dst,
uint32_t  row_cnt 
)

Copy pages within NAND device.

Parameters
[in]dev_numDevice number
[in]row_srcSource row address
[in]row_dstDestination row address
[in]row_cntNumber of pages (rows) to copy
Returns
execution status ARM_NAND_STATUS

Copy pages in NAND Device.

ARM_NAND_STATUS ARM_NAND_EraseBlock ( uint32_t  dev_num,
uint32_t  row 
)

Erase blocks in NAND device.

Parameters
[in]dev_numDevice number
[in]rowBlock start row address
Returns
execution status ARM_NAND_STATUS

Erase block in NAND device.

ARM_NAND_CAPABILITIES ARM_NAND_GetCapabilities ( void  )

Get driver capabilities.

Returns
ARM_NAND_CAPABILITIES

Retrieves information about capabilities in this driver implementation. The bitfield members of the struct ARM_NAND_CAPABILITIES encode various capabilities, for example if a hardware supports OneNAND Interface or is able to create signal events using the ARM_NAND_SignalEvent callback function.

Example:

extern ARM_DRIVER_NAND ARM_Driver_NAND0;
ARM_DRIVER_NAND *drv_info;
void read_capabilities (void) {
ARM_NAND_CAPABILITIES drv_capabilities;
drv_info = &ARM_Driver_NAND0;
drv_capablilities = drv_info->GetCapabilities ();
// interrogate capabilities
}
DRV_VERSION ARM_NAND_GetVersion ( void  )

Get driver version.

Returns
ARM_DRV_VERSION

Returns version information of the driver implementation in ARM_DRV_VERSION

  • API version is the version of the CMSIS-Driver specification used to implement this driver.
  • Driver version is source code version of the actual driver implementation.

Example:

extern ARM_DRIVER_I2C ARM_Driver_NAND;
ARM_DRIVER_NAND *drv_info;
void setup_nand (void) {
ARM_DRV_VERSION version;
drv_info = &ARM_DRIVER_NAND0;
version = drv_info->GetVersion ();
if (version.api < 0x10A) { // requires at minimum API version 1.10 or higher
// error handling
return;
}
}
ARM_NAND_STATUS ARM_NAND_Initialize ( ARM_NAND_SignalEvent_t  cb_event,
ARM_NAND_DEVICE ptr_device,
uint32_t  num_devices 
)

Initialize NAND Interface.

Parameters
[in]cb_eventPointer to ARM_NAND_SignalEvent
[in]ptr_devicePointer to device information
[in]num_devicesNumber of devices
Returns
execution status ARM_NAND_STATUS

The function initializes the NAND interface. It is called when the middleware component starts operation.

The function performs the following operations:

  • Initializes the resources needed for the NAND interface.
  • Registers the ARM_NAND_SignalEvent callback function.
  • Registers the NAND devices information.
  • Determines the amount of NAND devices.
  • Sets the peripheral to ARM_POWER_LOW power mode.

The parameter cb_event is a pointer to the ARM_NAND_SignalEvent callback function; use a NULL pointer when no callback signals are required.

The parameter ptr_device is a pointer to the ARM_NAND_DEVICE structure that defines the NAND devices.

The parameter num_devices specifies the number of NAND devices.

Example:

ARM_NAND_STATUS ARM_NAND_PowerControl ( ARM_POWER_STATE  state)

Control the NAND interface power.

Parameters
[in]statePower state
Returns
execution status ARM_NAND_STATUS

Control NAND Interface Power.

ARM_NAND_STATUS ARM_NAND_ReadID ( uint32_t  dev_num,
uint8_t  addr,
uint8_t *  buf,
uint32_t  len 
)

Read NAND device ID.

Parameters
[in]dev_numDevice number
[in]addrID address
[out]bufBuffer for data read from NAND
[in]lenNumber of bytes to read (buffer length)
Returns
execution status ARM_NAND_STATUS

Read Device ID from NAND.

ARM_NAND_STATUS ARM_NAND_ReadPage ( uint32_t  dev_num,
uint32_t  row,
uint32_t  col,
uint8_t *  buf,
uint32_t  len 
)

Read data from NAND page.

Parameters
[in]dev_numDevice number
[in]rowRow address
[in]colColumn address
[out]bufBuffer for data read from NAND
[in]lenNumber of bytes to read (buffer length)
Returns
execution status ARM_NAND_STATUS

Read data from NAND Page.

ARM_NAND_STATUS ARM_NAND_ReadParamPage ( uint32_t  dev_num,
uint32_t  col,
uint8_t *  buf,
uint32_t  len 
)

Read NAND parameter page.

Parameters
[in]dev_numDevice number
[in]colColumn address
[out]bufBuffer for data read from NAND
[in]lenNumber of bytes to read (buffer length)
Returns
execution status ARM_NAND_STATUS

Read parameter page from NAND.

ARM_NAND_STATUS ARM_NAND_ReadStatus ( uint32_t  dev_num,
uint8_t *  stat 
)

Read NAND device status.

Parameters
[in]dev_numDevice number
[out]statPointer to store status read from NAND
Returns
execution status ARM_NAND_STATUS

Read Device status from NAND.

ARM_NAND_STATUS ARM_NAND_ResetDevice ( uint32_t  dev_num)

Reset a NAND device.

Parameters
[in]dev_numDevice number
Returns
execution status ARM_NAND_STATUS

Reset NAND Device.

void ARM_NAND_SignalEvent ( uint32_t  dev_num)

Signal NAND event. Callback function.

Parameters
[in]dev_numDevice number Occurs when Program/Erase (WritePage, CopyPage, EraseBlock) completes.
Returns
none

Signal NAND Event. This callback function is invoked automatically after each read/write operation.

ARM_NAND_STATUS ARM_NAND_Uninitialize ( void  )

De-initialize NAND Interface.

Returns
execution status ARM_NAND_STATUS

The function ARM_NAND_Uninitialize de-initializes the resources of NAND interface and sets the peripheral to ARM_POWER_OFF power mode.

It is called when the middleware component stops operation and releases the software resources used by the interface.

ARM_NAND_STATUS ARM_NAND_WritePage ( uint32_t  dev_num,
uint32_t  row,
uint32_t  col,
const uint8_t *  buf,
uint32_t  len 
)

Write data to NAND page.

Parameters
[in]dev_numDevice number
[in]rowRow address
[in]colColumn address
[out]bufBuffer with data to write to NAND
[in]lenNumber of bytes to write (buffer length)
Returns
execution status ARM_NAND_STATUS

Write data to NAND Page.