DRV_SST26_SectorErase Function

C

bool DRV_SST26_SectorErase( const DRV_HANDLE handle, uint32_t address );

Summary

Erase the sector from the specified block start address.

Description

This function schedules a non-blocking sector erase operation of Flash memory. Each Sector is of 4 KB.

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

Preconditions

The DRV_SST26_Open() routine must have been called for the specified SST26 driver instance.

Parameters

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

Returns

True:

  • if the erase request is successfully sent to the Flash

False:

  • if Write enable fails before sending sector erase command to Flash
  • if sector erase command itself fails

Example

DRV_HANDLE handle; // Returned from DRV_SST26_Open
uint32_t sectorStart = 0;

if(DRV_SST26_SectorErase(handle, sectorStart) == false)
{
    // Error handling here
}

// Wait for erase to be completed
while(DRV_SST26_TRANSFER_BUSY == DRV_SST26_TransferStatusGet(handle));

Remarks

None.