L4+ detect ff ecc already set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-07-12 5:53 AM
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.
- Labels:
-
Flash
-
STM32L4 series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-07-12 6:29 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-07-12 7:13 AM
Well, almost the same result, but for production I really want to be 100% sure that space is ready to write.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-07-12 8:49 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-07-12 9:55 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-07-12 10:29 AM
Trap the ECC error using the ECCCIE interrupt and handle it appropriately. That's the supported recovery mechanism.
