Skip to main content
_EFrie
Senior
July 12, 2024
Question

L4+ detect ff ecc already set

  • July 12, 2024
  • 5 replies
  • 1684 views

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.

This topic has been closed for replies.

5 replies

TDK
July 12, 2024

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
_EFrieAuthor
Senior
July 12, 2024

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

TDK
July 12, 2024

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""."