3.8.19.9 SEFC_PageBufferCommit Function

C

bool SEFC_PageBufferCommit( const uint32_t address)

Summary

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

Description

Depending on which flash panel is mapped at the given address, it calls the assoicated SEFC flash controller and writes the data loaded in the SEFCx internal latch buffer to the flash memory.

Precondition

The SEFCx_Initialize() function should have been called once.

Parameters

ParamDescription
addressData 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

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

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

//Wait until the SEFCx controller is busy
while (SEFC_IsBusy(flashAddr));

Remarks

None