Hello,
I am writing some data to flash, but when it runs to storage_clear, I get the return code---0x10. It seems clear failed. And I tried storage_update, and it failed with 0x10 too. Anybody can help out for this?
Hello,
I am writing some data to flash, but when it runs to storage_clear, I get the return code---0x10. It seems clear failed. And I tried storage_update, and it failed with 0x10 too. Anybody can help out for this?
0x10 is NRF_ERROR_INVALID_ADDR. pstorage_clear() will return this if you use an address that is not word aligned.
Hi Petter,
I read the address of the block to be cleared. Its address is 0x2000201C which seems aligned with word. And I checked the data of block. And inside the block, block_id is 0x00027000. And to test if the address is available or not, I used pstorage_store and the return value is 0. I guess probably there are other issues which cause clear fail and update fail.
Ok. Could you set some breakpoints inside pstorage_clear() to figure out where the error is returned from? And what SDK version are you using?
Hi Petter, The return is from sd_flash_write(). And my softdevice is 7.1.0. Now, I got answer from a local supplier who said that the cause is I put the size 16 bytes, but it needs to be 1024 bytes(clear page). is there any function which can delete 100 pages once?
So you are using SoftDevice S110 7.1.0. What SDK are you using? It shouldn't be necessary to use the page size when using storage_clear(). At least not in later SDKs, see this.