1.1.4.4.14 DRV_NAND_FLASH_SkipBlock_BlockErase Function

C

bool DRV_NAND_FLASH_SkipBlock_BlockErase(const DRV_HANDLE handle, uint16_t blockNum, bool disableBlockCheck)

Summary

Erase a block.

Description

This function schedules a blocking block erase operation of Flash memory. It erases a given block.

Preconditions

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

Parameters

ParametersDescription
handleA valid open-instance handle, returned from the driver's open routine
blockNumBlock number to be erased
disableBlockCheck

0 - Block will be checked as good before erasing a given block

1 - Block will not check before erasing a given block

Returns

True - If the block erase is successfully completed.

False - If block erase fails.

Example

uint16_t blockNum = 0;
DRV_HANDLE handle; // Returned from DRV_NAND_FLASH_Open

if(DRV_NAND_FLASH_SkipBlock_BlockErase(handle, blockNum, 0))
{
    // Block erase is successfully completed
}

Remarks

This routine will block wait until erase request is completed successfully. Client should wait until erase is complete to send next transfer request.