1.1.4.4.7 DRV_NAND_FLASH_IdRead Function
C
bool DRV_NAND_FLASH_IdRead(const DRV_HANDLE handle, uint32_t *readId, uint8_t address)
Summary
Gets identifier codes from NAND Flash.
Description
This routine read identifier codes from NAND Flash.
Preconditions
The DRV_NAND_FLASH_Open() routine must have been called for the specified NAND FLASH driver instance.
Parameters
Param | Description |
---|---|
handle | A valid open-instance handle, returned from the driver's open routine |
readId | Pointer to 32-bit unsigned int into which ID will be stored |
address | Address to be send after command cycle. Address 0x20 is used for ONFI compliant Flash. |
Returns
true - If ID read successfully from the flash
false - If invalid handle
Example
#define NAND_FLASH_ADDR_ONFI_SIGNATURE 0x20 uint32_t readId = 0; DRV_HANDLE handle; // Returned from DRV_NAND_FLASH_Open if (DRV_NAND_FLASH_IdRead(handle, &readId, NAND_FLASH_ADDR_ONFI_SIGNATURE)) { // ID read successfully }
Remarks
This routine will block for hardware access.