13 POWER FAILURE/RESET SCENARIOS

1. What if there is power failure during DEE Initialization: If there are no active pages , DEE_Init() routine will continue to initialize DEE pages , if there is only one active page, then routine exits normally assuming there was a reset during DEE_Init() or DEE_Write(). No user data will be lost.

2. What if there is power failure during DEE Write: If the write is completed before the power failure then there is no problem , if not the last data will be lost.

3. What if there is power failure during Pack operation: If there is a reset during pack operation , the DEE_Init() routine will find 2 active pages during initialization and the DEE_Init() routine will erase the newer active page and call the pack operation on first page. Also page status is written after writing all the data. If there is a power reset before writing the page status pack operation will be performed in the next iteration during DEE_Init(). No user data will be lost.

4. What if there is power failure during copying data from active partition to inactive partition: The source data i.e. DEE data in the active partition is deleted only after all the data is copied from the active partition to the inactive partition. In case of power failure during copying , the data copy procedure is re-executed as long as there is data in the active partition. Each page data is copied first then the page status is copied and this makes sure that data is not lost.