
Dear James,
In message d18f75c7-388b-b607-ed70-64a250320d5a@gmail.com you wrote:
In your case, you could save the "erase" by overwriting the first 4 bytes (where the CRC32 checksum is stored) with 0xFFFFFFFF.
Wrong. I meant writing 0x00000000 - as you can always write that, setting any remaining 1 bits to 0 which does not require an erase of the sector.
In the case of my NOR flash storage, telling erase to do one byte actually causes the erasure of an entire flash sector, which we've reserved for the NV environment. You are of course correct that overwriting the CRC will have the same operational effect.
...and as the next "saveenv" will start with an erase, writing 0 to the CRC 32 field saves you one erase cycle on that sector.
I know, this is nitpicking. Soryy.
It's a rare occurrence that we need to do this, we don't use this sort of operation as a normal part of doing business.
Agreed. This should never be part of regular operation.
Best regards,
Wolfgang Denk