Skip to main content
Graduate
July 12, 2024
Question

L4+ detect ff ecc already set

  • July 12, 2024
  • 1 reply
  • 1652 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.

    1 reply

    Super User
    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.

    _EFrieAuthor
    Graduate
    July 12, 2024

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

    Super User
    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.