1.1.4.4.15 DRV_NAND_FLASH_SkipBlock_BlockRead Function

C

bool DRV_NAND_FLASH_SkipBlock_BlockRead(const DRV_HANDLE handle, uint16_t blockNum, uint8_t *data, bool disableBlockCheck)

Summary

Reads the data of a whole block from NAND Flash.

Description

This function schedules a blocking operation for reading the data of a whole block from NAND Flash.

Precondition

The DRV_NAND_FLASH_Open() routine must have been called for the specified NAND FLASH driver instance.

Parameters

ParamDescription
handleA valid open-instance handle, returned from the driver's open routine
blockNumBlock number to read
dataPointer to destination data buffer
disableBlockCheck0 - Block will be checked as good before reading a given block. 1 - Block will not check before reading a given block.

Returns

true - If Block read is successfully completed

false - If Block read fails

Example

DRV_HANDLE handle; // Returned from DRV_NAND_FLASH_Open
uint16_t blockNum = 3;
static uint8_t blockBuffer[262144 + 14336];

if (DRV_NAND_FLASH_SkipBlock_BlockRead(handle, blockNum, blockBuffer, 0))
{
    // Block read successfully completed
}

Remarks

This routine will block waiting until read request is completed successfully.