1.1.8.4.9 DRV_SFDP_ChipErase Function
1.1.8.4.9 C
bool DRV_SFDP_ChipErase( const DRV_HANDLE handle );1.1.8.4.9 Summary
Erase entire Flash memory.
1.1.8.4.9 Description
This function schedules a non-blocking chip erase operation of Flash memory.
The requesting client should call DRV_SFDP_TransferStatusGet() API to know the current status of the request.
1.1.8.4.9 Preconditions
The DRV_SFDP_Open() routine must have been called for the specified SFDP driver instance.
1.1.8.4.9 Parameters
| Parameters | Description |
|---|---|
| handle | A valid open-instance handle, returned from the driver's open routine |
1.1.8.4.9 Returns
True:
- If the erase request is successfully sent to the Flash
False:
- If Write enable fails before sending chip erase command to Flash
- If chip erase command itself fails
1.1.8.4.9 Example
DRV_HANDLE handle; // Returned from DRV_SFDP_Open
if(DRV_SFDP_ChipErase(handle) == false)
{
// Error handling here
}
// Wait for erase to be completed
while(DRV_SFDP_TransferStatusGet(handle) == DRV_SFDP_TRANSFER_BUSY);1.1.8.4.9 Remarks
None.
