SPRADL4 January 2025 F29H850TU , F29H859TU-Q1
The EEPROM_64_Bit_Mode_Check_EOS() determines if the EEPROM unit is full and erases it if so.
First, the end address of EEPROM is set according to the device being used and the configuration. The END_OF_SECTOR directive is set in the EEPROM_Config.h file.
uint8_t* End_Address = (uint8_t*) END_OF_SECTOR;Next, the EEPROM bank pointer is compared to the end address. If writing 8 bytes beginning at the current EEPROM bank pointer would go beyond the End Address, this indicates the EEPROM unit is full. At this point, the EEPROM unit is erased, performs a blank check and the EEPROM Bank Pointer is reset to the beginning of the EEPROM Unit.
if (Bank_Pointer > End_Address - WRITE_SIZE_BYTES)
{
EEPROM_Erase();
}