Jump to main content

##

# 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

Param | Description
--- | ---
handle | A valid open-instance handle, returned from the driver's open routine
blockNum | Block 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.