1.1.8.4.8 DRV_SFDP_BulkErase Function

1.1.8.4.8 C

bool DRV_SFDP_BulkErase( const DRV_HANDLE handle, uint32_t address );

1.1.8.4.8 Summary

Erase a block from the specified block start address.

1.1.8.4.8 Description

This function schedules a non-blocking block erase operation of Flash memory. The block size is determined from SFDP discovery (typically 64 KB).

The requesting client should call DRV_SFDP_TransferStatusGet() API to know the current status of the request.

1.1.8.4.8 Preconditions

The DRV_SFDP_Open() routine must have been called for the specified SFDP driver instance.

1.1.8.4.8 Parameters

ParametersDescription
handleA valid open-instance handle, returned from the driver's open routine
addressBlock start address to be erased

1.1.8.4.8 Returns

True:

  • If the erase request is successfully sent to the Flash

False:

  • If Write enable fails before sending block erase command to Flash
  • If block erase command itself fails

1.1.8.4.8 Example

DRV_HANDLE handle; // Returned from DRV_SFDP_Open
uint32_t blockStart = 0;

if(DRV_SFDP_BulkErase(handle, blockStart) == false)
{
    // Error handling here
}

// Wait for erase to be completed
while(DRV_SFDP_TransferStatusGet(handle) == DRV_SFDP_TRANSFER_BUSY);

1.1.8.4.8 Remarks

None.