1.34.5.12 1.35.4.12 1.36.6.12 EFC_PageBufferCommit Function

C

bool EFC_PageBufferCommit( const uint32_t address)

Summary

Commits the data present in EFC internal latch buffer to flash memory

Description

Writes data loaded in the EFC internal latch buffer to the flash memory.

Precondition

The EFC_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

EFC_PageBufferWrite((uint32_t*)data, (uint32_t)flashAddr);

//update data here

EFC_PageBufferWrite((uint32_t*)data, (uint32_t)flashAddr);

//Commit the final data in the EFC internal latch buffer to the flash memory
EFC_PageBufferCommit((uint32_t)flashAddr);

//Wait until the EFC controller is busy
while (EFC_IsBusy());

Remarks

None