News for hackers. Stuff that matters.
Re:As above, so below, part 2. Bare metal Rust generics by jlokier on Monday August 31, 2020 @01:34PM (#24333844)
That area full of 1s might not be really erased, though, if power was removed or the device reset during an erase cycle before.

Those would be partially-charged cells, and should be erased properly before writing, lest you start getting temperamental read errors later.

But repeatedly erasing blocks just to add a byte will wear out the block, as well as take a long time as you point out.

I think the solution to these two constraints is filesystem-like book-keeping of which regions are in which states.

Re:As above, so below, part 2. Bare metal Rust generics by __cuervo on Monday August 31, 2020 @01:37PM (#24333883)
That's a risk, yes. For our use case, there is very strict error checking/firmware signature verification on every process involving the flash, so the corruption case is always handled gracefully, leading to a full erase anyway.