I faced some issues while studying the driver. I describe one of them:
To determine the status of any block, there is a process that investigates block indicators and erase cycle of blocks. This is performed by FSL_ReadBlockStatus function that is a middle level function.
The driver sets a block as active if the following condition is satisfied: (Line 333 from file Eed_middlelevel.c)
if (!((temp == ERASED_WORD) && (FALSE == eccErrorStatus_Flag)))
{
return (B_ACT);
}
else
{
…
It indicates that when ECC error is present, the driver considers the block as active. How this situation can be explained? It seems it is better to consider the block as Invalid in this case.
The above situation also applies to copy-done indicator.