1.6.16.5 1.7.17.5 1.10.14.6 1.11.15.6 1.12.15.6 1.13.14.6 1.14.11.5 1.15.12.5 1.16.11.5 1.17.11.5 1.18.11.5 1.19.11.5 1.20.11.5 1.21.12.5 1.22.16.6 1.23.15.6 1.24.13.6 NVM_PageErase Function

C

bool NVM_PageErase( uint32_t address )

Summary

Erases a Page in the NVM

Description

This function will erase one page in NVM. Calling this function will cause the CPU execution to stall, hence blocking execution of any other thread. Execution resumes when the Erase operation has completed.

If the interrupt operation was enabled and if a callback was registered, then the callback function will be called. The NVM_IsBusy() function can be used to poll for completion of the operation. The application should ensure that there are no other operations in progress before calling this function. Once the operation is complete, the NVM_ErrorGet() function can be called to check operation success.

Precondition

Also validate if NVM controller is ready to accept new request by calling NVM_IsBusy().

Parameters

Param Description
address start address of the page to be erased.

Returns

Always return true.

Example

// This code snippet shows how the NVM_RowErase function is called to
// erase the row at locatioin 0x9D100000.

// Erase the row. This will erase all the pages in the row.
NVM_PageErase(0x9D100000);
while(NVM_IsBusy());

if(NVM_ErrorGet() == NVM_ERROR_NONE)
{
    // Operation was successful.
}

Remarks

None.