SDK: NCS 1.8.0
Based on: Peripheral LBS example
Central: Mobile (iPhone)
Peripheral: nRF52832
Hi,
I am attempting to integrate NVS within my custom application based on the example mentioned above and it seems as the data is not being written correctly in flash. I followed the example found within the ncs SDK, on how to initialize NVS.
When data is written to flash using "nvs_write", there is no error returned and the correct number of bytes is returned but when attempting to read back the data at a later time, "nvs_read" returns an error code of "-2 ENOENT".
After stepping through the code it seems as "nvs_init()" is called twice, once by "bt_enable()" and again within my custom initialization of nvs. I have attached a screenshot of the UART output and what's interesting is that both instances of nvs return the same "alloc wra" and "data wra" values. Is this expected?
Here is my custom initialization of NVS below:
Are there additional settings that need to be modified when using Bluetooth with NVS for user data?
Any advice would be appreciated!
Thank you,
Tom