Internal Flash Read/Write with word-aligned addresses instead of page aligned address

Hi Team,

We have allocated the 2 pages for our config data storage. In that each page divided into 4 sub groups, likes each 1k size allocated for one group.

Is there any way to update the specific address in that page. Eg: Page start Address is 0xF4000(4k), in that F4400 is start with another group of data.F4800 start with another type of data.

Is it possible to update the Individual address spaces like F4400  and F4800 as a start address instead of F4000 as start address.

And in some scenarios we need to write or read the only 4 bytes of data from that specific start address.

please suggest us is there any way to update word-aligned addresses like multiple of 4 bytes not entire page at a time.

Regards,

Srinivas.V

Parents
  • Hi Srinivas,

    You can write (flip bits from '1' to '0') to any word in the flash any time (though not repeatedly between each erase). However, erasing (flip all bits to '1') has to happen per page. There is physically no way to erase less than a page at a time. This is a property of flash memory. If you need to update data, that typically means that you not only want to flip '1' to '0' but also '0' to '1', and that involves erasing and writing again. You need to handle that somehow, either yourself, or perhaps better, by using an existing file system that does it for you (both the nRF5 SDK and nRF Connect SDK includes basic file systems that are suitable for this).

    Einar

Reply
  • Hi Srinivas,

    You can write (flip bits from '1' to '0') to any word in the flash any time (though not repeatedly between each erase). However, erasing (flip all bits to '1') has to happen per page. There is physically no way to erase less than a page at a time. This is a property of flash memory. If you need to update data, that typically means that you not only want to flip '1' to '0' but also '0' to '1', and that involves erasing and writing again. You need to handle that somehow, either yourself, or perhaps better, by using an existing file system that does it for you (both the nRF5 SDK and nRF Connect SDK includes basic file systems that are suitable for this).

    Einar

Children
No Data
Related