Part Number: TMS320F28388D
Tool/software:
Hello Team,
Skyler Baumer and Vamsi Gudivada
In the example code, a variable is used to track EEPROM empty or EEPROM has data but this approach fails because the variable is reinitialized on every boot.
How can I detect an empty EEPROM during runtime without relying on variables?
I want to implement:
• First boot: EEPROM empty, no data copied.
• Shutdown: RAM data stored into EEPROM.
• Next boot: Data read from EEPROM, copied into RAM.
void EEPROM_Read(uint16* Read_Buffer)
{
uint16 i;
// I am expecting an api that can return the status of EEPROM and store it into Empty_EEPROM.
if (Empty_EEPROM)
{
// Dont read EEPROM
} else
{
// Find Current Bank and Current Page
EEPROM_GetValidBank(1);
// Increment page pointer to point at first data word
Page_Pointer += 8;
// Transfer contents of Current Page to Read Buffer
for(i=0;i<DATA_SIZE;i++)
{
Read_Buffer[i] = *(Page_Pointer++);
}
}
}
Is there an API that returns an error code or the status of EEPROM (empty or non-empty) run time?