1.37.10.15 NVMCTRL_PageBufferCommit Function
C
bool NVMCTRL_PageBufferCommit( const uint32_t address)
Summary
Commits the data present in NVM internal page buffer to flash memory
Description
Writes data loaded in the NVM internal page buffer to the flash memory.
Precondition
The NVMCTRL_Initialize() function should have been called once.
Parameters
Param | Description |
---|---|
address | Data Flash address to be modified. |
Returns
true if the operation was successful, else returns false.
Example
uint32_t* data; //data - pointer to the buffer to be written to flash memory
uint32_t flashAddr; //flashAddr - variable containing flash address
//populate data and flashAddr
NVMCTRL_PageBufferWrite((uint32_t*)data, (uint32_t)flashAddr);
//update data here
NVMCTRL_PageBufferWrite((uint32_t*)data, (uint32_t)flashAddr);
//Commit the final data in the NVM internal page buffer to the flash memory
NVMCTRL_PageBufferCommit((uint32_t)flashAddr);
//Wait until the NVM controller is busy
while (NVMCTRL_IsBusy());
Remarks
This API is works only if the NVM is configured for manual write policy