EFR32 Blue Gecko 13 Software Documentation
efr32bg13-doc-5.1.2
|
EFM32GG_STK3700 nandflash driver.
Copyright 2015 Silicon Labs, Inc. http://www.silabs.com
This file is licensed under the Silabs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.
Definition in file nandflash.h.
Go to the source code of this file.
Data Structures | |
struct | NANDFLASH_Info_TypeDef |
NANDFLASH device information structure. More... | |
Macros | |
#define | NAND256W3A_SPARESIZE 16 |
#define | NAND_SPARE_BADBLOCK_POS 5 |
#define | NAND_SPARE_ECC0_POS 6 |
#define | NAND_SPARE_ECC1_POS 7 |
#define | NAND_SPARE_ECC2_POS 8 |
Enumerations | |
enum | NANDFLASH_Status_TypeDef { NANDFLASH_STATUS_OK = 0, NANDFLASH_INVALID_DEVICE = -1, NANDFLASH_INVALID_ADDRESS = -2, NANDFLASH_WRITE_ERROR = -3, NANDFLASH_ECC_ERROR = -4, NANDFLASH_ECC_UNCORRECTABLE = -5, NANDFLASH_INVALID_SETUP = -6, NANDFLASH_NOT_INITIALIZED = -7 } |
NANDFLASH status enumerator. More... | |
Functions | |
bool | NANDFLASH_AddressValid (uint32_t addr) |
Check if an address is valid for the nand flash device. More... | |
int | NANDFLASH_CopyPage (uint32_t dstAddr, uint32_t srcAddr) |
Copy a page within the device to a new location. More... | |
NANDFLASH_Info_TypeDef * | NANDFLASH_DeviceInfo (void) |
Return a pointer to a NANDFLASH_Info_TypeDef structure, which contain vital nand flash device information. More... | |
int | NANDFLASH_EccCorrect (uint32_t generatedEcc, uint32_t readEcc, uint8_t *data) |
Check generated ECC against ECC read from device and correct data if possible. More... | |
int | NANDFLASH_EraseBlock (uint32_t address) |
Erase a block in the nand flash. More... | |
int | NANDFLASH_Init (int dmaCh) |
Initialize the NANDFLASH module. More... | |
int | NANDFLASH_MarkBadBlock (uint32_t address) |
Mark a block as bad. More... | |
int | NANDFLASH_ReadPage (uint32_t address, uint8_t *buffer) |
Read a page from nand device. Ecc errors will be detected and corrected if possible. NANDFLASH_Info_TypeDef::ecc will be set to the ecc generated while reading the page data. NANDFLASH_Info_TypeDef::spare will be set to the content of the page spare area. More... | |
int | NANDFLASH_ReadSpare (uint32_t address, uint8_t *buffer) |
Read the spare area content of a page. More... | |
int | NANDFLASH_WritePage (uint32_t address, uint8_t *buffer) |
Write a page in nand device. The ECC generated while writing the page data is written in the spare area at byte positions 7, 8 and 9. More... | |