Hello,
I have read through the pstorage documentation here: devzone.nordicsemi.com/.../a00018.html
and I followed the tutorial here: devzone.nordicsemi.com/.../
I have implemented pstorage with ble_app_template from SDK 0.9.2 and softdevice S132 (version 1.0.0.3). I am using the nRF52 dev board with the PCA10036. I am able to write and then read successfully if I do flash once, but if i change the data that I am trying to write (called dummy_data in the example from the devzone i referenced above), the data read back will be the data from the previous write, and the read won't change to the new data unless I erase the full chip in nRFgo studio. I figured this is because I need to clear the memory blocks before I use them. Eventually, I added the memory clear (for all blocks in the module) in the code before I perform pstorage operations, but it does not properly clear the memory (whenever I try to read a byte from a block, it comes back as 255).
Everytime I call pstorage load, clear, store, or register, I always get an NRF_SUCCESS error code back.
But my problem seems to be similar to the one shown here: devzone.nordicsemi.com/.../
I am getting an event callback for pstorage_load commands, but for pstorage_store and pstorage_clear, I am not getting an event callback.
I did do the following:
- set sys_evt_dispatch with softdevice_sys_evt_handler_set and added pstorage_sys_event_handler to sys_evt_dispatch.
- I have the softdevice_handler module and all its dependencies included
- The SD_EVT_IRQHandler is not being overwritten in main.c
So I am not sure why I do not get callbacks for store and clear, or why the blocks do not clear properly.
Thanks in advance.