Hello,
I'm a little consufed about the page I need to erase before I can write again on the UICR CUSTOMER registers. Is there a way to erase only the UICR CUSTOMER registers?
Thank you
Hello,
I'm a little consufed about the page I need to erase before I can write again on the UICR CUSTOMER registers. Is there a way to erase only the UICR CUSTOMER registers?
Thank you
UICR customer registers are meant to be stored with values that are supposed to stay there during the life time of the softdevice. you cannot erase them without erasing everything on chip.
if you want persistant storage that you need to modify now and then, use pstorage module which will give you one page (1024 bytes) and you can write/read/modify single or multiple words in that page . There is really good documentation for it in SDK and many have used it and tested to be working OK. This module is designed to work well even with ongoing radio activity.
UICR customer registers are meant to be stored with values that are supposed to stay there during the life time of the softdevice. you cannot erase them without erasing everything on chip.
if you want persistant storage that you need to modify now and then, use pstorage module which will give you one page (1024 bytes) and you can write/read/modify single or multiple words in that page . There is really good documentation for it in SDK and many have used it and tested to be working OK. This module is designed to work well even with ongoing radio activity.
Can you point me some info on how to use that?
I saw it need a softdevice but I'm not using that, is it still possible to use it?
Just saw there is an option for no softdevice. Do you have an example?
i did not knew that you did not have a softdevice, in that case you can use last flash page for your application specific data, hopefully your app is not big that it consumes even the last page of avaialble flash (easy to remember its address in your app) and to read and write you can use ble_Flash module. in SDK 8.x you will find it at nRF51_SDK_8.0.0_5fc2c3a\components\drivers_nrf\ble_flash\ble_flash.h
The downside of this is that you still cannot update a word without erasing the whole page, this is unfortunately the known limitation of this type of memory. You can workaround that if you make your own algorithm to update a word, you need to reserve two flash pages for that.
it might go like this
1)reserve one flash page for your app and one for swap data
2) when you want to update one word in the app page, you copy full app page to swap page
3) erase app page
4) copy everything from swap page to app page until your word which need to be modified
5) write the new data to the word address in your app page, and copy the rest of swap page to app page.
I know, all this to update a word? updating memory in flash is not cheap.
Thank you,
I'll only need to store 100bytes so I can keep an array with the data. Can you just tell me the diference between this last method and pstorage without soft-device?