Skip to content
Commit 83ac3f8b authored by Aurelien Jarno's avatar Aurelien Jarno Committed by Anas Nashif
Browse files

subsys: fs/nvs: explicitly pad flash writes up to the write block size



Some SoCs do not allow shorter writes than the write block size, usually
when they have ECC memory. This patch first write all data in multiple
of the write block size and then do a last write with the data padded.
It uses 0xff as the padding byte to avoid wearing-out the flash.

nvs_append_close() is slightly modified to compute the crc16 that will
be put in the slot over the size defined in the header, to match the way
it is checked on read.

Signed-off-by: default avatarAurelien Jarno <aurelien@aurel32.net>
parent a7ffc83b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment