SPRADL4 January 2025 F29H850TU , F29H859TU-Q1
The EEPROM_UpdatePageData() function provides functionality for updating the EEPROM page data. This function is called from the EEPROM_Write_Page() function and programs the page to flash in 64-bit increments.
uint32_t i, Page_Offset;
for(i = 0; i < EEPROM_PAGE_DATA_SIZE / WRITE_SIZE_BYTES; i++)
{
Page_Offset = WRITE_SIZE_BYTES*2 + (WRITE_SIZE_BYTES*i);
EEPROM_Write_Buffer(Page_Pointer + Page_Offset, Write_Buffer + (i*WRITE_SIZE_BYTES));
}If the programming was successful, the page is marked as current and the Empty_EEPROM flag is cleared.Fill_Buffer(Page_Status, status_buffer_len, CURRENT_PAGE);
EEPROM_Write_Buffer(Page_Pointer, Page_Status);
Empty_EEPROM = 0;