16.3.4.2 ECC Check of
All-’1
’ Data
All bits, both data bits and ECC bits, will read as 1
in an erased Flash.
Since the address is baked into the ECC calculation, reading a random word from an erased
Flash will usually result in an ECC error which may be problematic when prefetching one
address past the last valid Flash instruction or using the Flash to emulate EEPROM or disc.
The ECCALL1 bit field in the Control C (CTRLC) register allows disabling of ECC check of
Flash words containing all ‘1
’s. Enabling the ECCALL1 mechanism will
slightly reduce the diagnostic coverage of the ECC mechanism.
The default setting is to check all words, also those containing all ‘1
’s.
The user must ensure this does not cause an ECC error when prefetching invalid instructions
which can be ensured by programming a valid instruction, such as an NOP
,
into all Flash locations that may be prefetched (but later flushed from the pipeline and
thus never executed).