This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

pstorage data is cleared after DFU

Hi: I reference rate meter program: “nRF5_SDK_11.0.0_89a8197\examples\ble_peripheral\ble_app_hrs\pca10040\s132_with_dfu”. After function "device_manager_init",I handle a custom pstorage.

void nonvolatile_storage_init(void) { ret_code_t err_code; pstorage_module_param_t param;

err_code = pstorage_init(); if (NRF_SUCCESS != err_code) {

}

param.block_size = NONVOLATILE_BLOCK_SIZE; // 24
param.block_count = NONVOLATILE_BLOCK_COUNT; // 3
param.cb = nonvolatile_cb_handler;

err_code = pstorage_register(&param, &nonvolatile_handle); if (NRF_SUCCESS != err_code) {

} } And it is work ok.It can save my data,but after DFU,data in this area was cleared.But this is not the result I wanted.So can you help me,tell me how to deal with it. Thank you very mach!

Related