1.1.8.4.5 DRV_SFDP_UnlockFlash Function
1.1.8.4.5 C
bool DRV_SFDP_UnlockFlash( const DRV_HANDLE handle );1.1.8.4.5 Summary
Unlocks the Flash device for Erase and Program operations.
1.1.8.4.5 Description
This function schedules a blocking operation for unlocking the Flash blocks globally. This allows to perform erase and program operations on the Flash.
1.1.8.4.5 Precondition
The DRV_SFDP_Open() routine must have been called for the specified SFDP driver instance.
1.1.8.4.5 Parameters
| Parameters | Description |
|---|---|
| handle | A valid open-instance handle, returned from the driver's open routine |
1.1.8.4.5 Returns
True:
- If the unlock is successfully completed
False:
- If Write enable fails before sending unlock command to Flash
- If Unlock Flash command itself fails
1.1.8.4.5 Example
DRV_HANDLE handle; // Returned from DRV_SFDP_Open
if(DRV_SFDP_UnlockFlash(handle) == false)
{
// Error handling here
}1.1.8.4.5 Remarks
None.
