cancel
Showing results for 
Search instead for 
Did you mean: 

L4+ detect ff ecc already set

_EFrie
Associate III

Is there any known way to detect if a double word 0xffffffff value has been programmed? I’m not seeing any quick way, other than finding out after getting flash error bits set.

 

The bootloader I’m working with checks the sector for all 0xff to avoid erasing time, but with ecc that doesn’t tell if it has ecc flash programmed or not.

5 REPLIES 5
TDK
Guru

No, there's not.

You could change the writing portion of the bootloader to skip double words if they're 0xFF. Achieves the same result.

If you feel a post has answered your question, please click "Accept as Solution".
_EFrie
Associate III

Well, almost the same result, but for production I really want to be 100% sure that space is ready to write.

If you never write all 0xFFs, then reading all 0xFFs would mean it can be written.

I would consider how likely it is that a sector is all 0xFFs and yet has been written. Check your binary file and see if there is even a single occurrence of an aligned double word of all 0xFFs. Couple that with the likelihood that it's at the start of a sector, and that writing got interrupted mid-sector. It's just infinitesimally small. Bigger things to worry about, almost certainly larger bugs to squash.

If you feel a post has answered your question, please click "Accept as Solution".
_EFrie
Associate III

Perhaps, but if you’ve been in programming long enough you know if it can happen it will, and needs a recovery mechanism in place.  In this case what triggered this is a test binary with ff fill and something in upper bank to test firmware can write in upper memory half.  

Trap the ECC error using the ECCCIE interrupt and handle it appropriately. That's the supported recovery mechanism.

If you feel a post has answered your question, please click "Accept as Solution".