Hello,
I am working on a project based off sensor_oad (SDK 4.10). Everything works well, including OAD with BIM and persistent app flashed onto the device.
Here is the NVS area I am using (0x30000 is just after the end of my app).
I use the following to initialise NVS:
NVS_Params nvsParams;
NVS_init();
NVS_Params_init(&nvsParams);
nvsHandle = NVS_open(CONFIG_NVS_DEVICE_STATE, &nvsParams);
and in flash_interface_int_rtos.c, I commented out initialisation of NVS:
void flash_init(void)
{
// NVS_init();
// NVS_Params_init(&nvsParams);
}
The app runs fine, OAD still works. But, if I write to flash thus:
NVS_write(nvsHandle, 0, (void *)internalState, sizeof(*internalState), NVS_WRITE_ERASE | NVS_WRITE_POST_VERIFY);
the app is still functional, but trying an OAD firmware update no longer works:
Info: Sending 0x0001 Target Reset Req
Info: Retrying 0x0001 Target Reset - Attempt 1
Info: Retrying 0x0001 Target Reset - Attempt 2
Info: Retrying 0x0001 Target Reset - Attempt 3
Info: OAD Failed
Any help appreciated.



