MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
Modules | |
Flexspi Nand Flash | |
Semc Nand Flash | |
Data Structures | |
struct | nand_config_t |
NAND Flash Config block structure. More... | |
struct | nand_handle_t |
NAND Flash handle info. More... | |
NAND FLASH Driver | |
status_t | Nand_Flash_Init (nand_config_t *config, nand_handle_t *handle) |
Initialize NAND FLASH devices. More... | |
status_t | Nand_Flash_Read_Page (nand_handle_t *handle, uint32_t pageIndex, uint8_t *buffer, uint32_t length) |
Read page data from NAND Flash. More... | |
status_t | Nand_Flash_Read_Page_Partial (nand_handle_t *handle, uint32_t pageIndex, uint32_t offset_bytes, uint8_t *buffer, uint32_t length) |
Read page partial data from NAND Flash. More... | |
status_t | Nand_Flash_Page_Program (nand_handle_t *handle, uint32_t pageIndex, uint8_t *src, uint32_t length) |
Program page data to NAND Flash. More... | |
status_t | Nand_Flash_Erase_Block (nand_handle_t *handle, uint32_t blockIndex) |
Erase block NAND Flash. More... | |
struct nand_config_t |
Data Fields | |
void * | memControlConfig |
memory controller configuration, should be assigned to specific controller configuration structure pointer. More... | |
void* nand_config_t::memControlConfig |
struct nand_handle_t |
Data Fields | |
uint8_t | vendorType |
Driver Base address. More... | |
uint32_t | bytesInPageDataArea |
Bytes in page data area . More... | |
uint32_t | bytesInPageSpareArea |
Bytes in page spare area . More... | |
uint32_t | pagesInBlock |
Pages in each block. More... | |
uint32_t | blocksInPlane |
blocks in each plane. More... | |
uint32_t | planesInDevice |
planes in each device . More... | |
void * | deviceSpecific |
Device specific control parameter. | |
uint8_t nand_handle_t::vendorType |
vendor type
uint32_t nand_handle_t::bytesInPageDataArea |
uint32_t nand_handle_t::bytesInPageSpareArea |
uint32_t nand_handle_t::pagesInBlock |
uint32_t nand_handle_t::blocksInPlane |
uint32_t nand_handle_t::planesInDevice |
status_t Nand_Flash_Init | ( | nand_config_t * | config, |
nand_handle_t * | handle | ||
) |
This function initialize NAND Flash controller and NAND Flash.
config | Nand 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: |
semc_mem_nand_config_t semcNandconfig = { ..... } nand_config_t config = { .memControlConfig = (void *) .driverBaseAddr = (void *)SEMC; }
handle | The NAND Flash handler. |
execution | status |
status_t Nand_Flash_Read_Page | ( | nand_handle_t * | handle, |
uint32_t | pageIndex, | ||
uint8_t * | buffer, | ||
uint32_t | length | ||
) |
handle | The NAND Flash handler. |
pageIndex | Nand flash page index, range from 0 ~ xxx. |
buffer | Nand flash buffer to read data to. |
length | Nand flash read length. |
execution | status |
status_t Nand_Flash_Read_Page_Partial | ( | nand_handle_t * | handle, |
uint32_t | pageIndex, | ||
uint32_t | offset_bytes, | ||
uint8_t * | buffer, | ||
uint32_t | length | ||
) |
handle | The NAND Flash handler. |
pageIndex | Nand flash page index, range from 0 ~ xxx. |
offset_bytes | Offset to start read the page data. |
buffer | Nand flash buffer to read data to. |
length | Nand flash read length. |
execution | status |
status_t Nand_Flash_Page_Program | ( | nand_handle_t * | handle, |
uint32_t | pageIndex, | ||
uint8_t * | src, | ||
uint32_t | length | ||
) |
handle | The NAND Flash handler. |
pageIndex | Nand flash page index, range from 0 ~ xxx. |
src | The data to be programed to the page. |
length | Nand flash read length. |
execution | status |
status_t Nand_Flash_Erase_Block | ( | nand_handle_t * | handle, |
uint32_t | blockIndex | ||
) |
handle | The NAND Flash handler. |
blockIndex | Nand flash block index to be erased, range from 0 ~ xxx. |
execution | status |