DRV_SST38_SectorErase Function

C

bool DRV_SST38_SectorErase( const DRV_HANDLE handle, uint32_t address )

Summary

Erase the sector from the specified block start address.

Description

This function schedules a blocking sector erase operation of Flash memory.

Each Sector is of 4 KB.

Preconditions

The DRV_SST38_Open() routine must have been called for the specified SST38 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;
uint32_t sectorStart = 0;

if(DRV_SST38_SectorErase(handle, sectorStart) == false)
{
    printf("Error handling here");
}

Remarks

None.