Flash EEPROM Emulation
Brief
Demonstrates EEPROM emulation on internal flash using the eeprom_emulation library with a 100-cycle stress test driven by software power-on resets (POR).
Details
The example emulates EEPROM storage by writing two virtual variables to flash: a counter (APP_COUNTER_ADDR) and a status value (APP_STATUS_ADDR). On each boot, the device reads the current counter value, increments it, writes it back, and triggers a software POR to simulate the next cycle. This repeats until the counter reaches the target value (100 cycles), at which point the test is complete.
On the first boot or after test completion, the EEPROM region is formatted and the counter is reset to its initial value to begin a new run.
If any EEPROM API call returns an unexpected status, LED4 blinks continuously. To recover, manually erase the flash and reset the device to start a fresh run.
Flash Configuration
All EEPROM emulation operations use Bank 1. The region starts at 0x0007E000 and spans 4 sectors x 2KB = 8KB (0x0007E000 to 0x0007FFFF).
Per-device configuration (variables, sector size, start address, cycle count) is in: ti_sdk_config/{device}/default/libraries_cfg/eeprom_emul_conf.h
External connections
LED5 (GREEN) - blinks continuously when the 100-cycle test completes successfully
LED4 (RED) - blinks continuously on EEPROM error; erase flash and reset to recover