MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Nor Flash Component

Overview

Modules

 Old Nor Flash
 
 Spifi Nor Flash
 

Data Structures

struct  nor_config_t
 NOR Flash Config block structure. More...
 
struct  nor_handle_t
 NOR Flash handle info. More...
 

NOR FLASH Driver

status_t Nor_Flash_Init (nor_config_t *config, nor_handle_t *handle)
 Initialize NOR FLASH devices. More...
 
status_t Nor_Flash_Read (nor_handle_t *handle, uint32_t address, uint8_t *buffer, uint32_t length)
 Read page data from NOR Flash. More...
 
status_t Nor_Flash_Page_Program (nor_handle_t *handle, uint32_t address, uint8_t *buffer)
 Program page data to NOR Flash. More...
 
status_t Nor_Flash_Erase_Sector (nor_handle_t *handle, uint32_t address)
 Erase sector. More...
 
status_t Nor_Flash_Erase_Block (nor_handle_t *handle, uint32_t address)
 Erase block. More...
 
status_t Nor_Flash_Erase_Chip (nor_handle_t *handle)
 Erase Chip NOR Flash . More...
 

Data Structure Documentation

struct nor_config_t

Data Fields

void * memControlConfig
 memory controller configuration, should be assigned to specific controller configuration structure pointer. More...
 

Field Documentation

void* nor_config_t::memControlConfig
struct nor_handle_t

Data Fields

uint32_t bytesInPageSize
 Driver Base address. More...
 
uint32_t bytesInSectorSize
 Minimun Sector size in byte supported by Serial NOR.
 
uint32_t bytesInMemorySize
 Memory size in byte of Serial NOR.
 
void * deviceSpecific
 Device specific control parameter.
 

Field Documentation

uint32_t nor_handle_t::bytesInPageSize

Page size in byte of Serial NOR

Function Documentation

status_t Nor_Flash_Init ( nor_config_t config,
nor_handle_t handle 
)

This function initialize NOR Flash controller and NOR Flash.

Parameters
configNOR flash configuration. The "memControlConfig" and "driverBaseAddr" are controller specific structure. please set those two parameter with your Nand controller configuration structure type pointer. such as for SEMC:

spifi_mem_nor_config_t spifiNorconfig = { ..... } nor_config_t config = { .memControlConfig = (void *) .driverBaseAddr = (void *)SPIFI0; }

Parameters
handleThe NOR Flash handler.
Return values
executionstatus
status_t Nor_Flash_Read ( nor_handle_t handle,
uint32_t  address,
uint8_t *  buffer,
uint32_t  length 
)
Parameters
handleThe NOR Flash handler.
addressNOR flash start address to read data from.
bufferNOR flash buffer to read data to.
lengthNOR flash read length.
Return values
executionstatus
status_t Nor_Flash_Page_Program ( nor_handle_t handle,
uint32_t  address,
uint8_t *  buffer 
)
Parameters
handleThe NOR Flash handler.
addressThe address to be programed.
bufferThe buffer to be programed to the page.
Return values
executionstatus
status_t Nor_Flash_Erase_Sector ( nor_handle_t handle,
uint32_t  address 
)
Parameters
handleThe NOR Flash handler.
addressThe start address to be erased.
Return values
executionstatus
status_t Nor_Flash_Erase_Block ( nor_handle_t handle,
uint32_t  address 
)
Parameters
handleThe NOR Flash handler.
addressThe start address to be erased.
Return values
executionstatus
status_t Nor_Flash_Erase_Chip ( nor_handle_t handle)
Parameters
handleThe NOR Flash handler.
Return values
executionstatus