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
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?
pstorage is heavier weight library designed to work in between radio activity. It cooperates with softdevice to negotiate the time for softdevice to become idle so that it gets time to write to the flash. The last method is direct writing to flash without softdevice coming into picture, this way the app takes responsibility that it does not make flash writes while the radio is accessing flash,else there will be a memory bus error currently pstorage cannot work without softdevice, but we are planning to make work without it in the future releases.