This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

FOTA issue with NVS

SDK: NCS 1.8.0

Based on: Peripheral LBS example

Central: Mobile (iPhone)

Peripheral: nRF52832

Hi,

We are in the process of adding FOTA to our custom project and we are running into issues related to NVS. This is a continuation of my previous post: https://devzone.nordicsemi.com/f/nordic-q-a/84285/using-nvs-with-bluetooth-enabled. The following post is similar to our situation, https://devzone.nordicsemi.com/f/nordic-q-a/77781/problem-to-read-back-flash-with-nvs-when-concurrent-use-with-bluetooth,  but unfortunately, it did not solve our issue. I followed this guide for adding FOTA upgrades to our project: developer.nordicsemi.com/.../ug_nrf52.html

Flash operations were running correctly before adding FOTA to the project.

The project builds and runs but our initialization of NVS fails to properly initialize. When attempting to read data, an error of -13(EACCES) is returned.

Below is our custom overlay file.

Our yml file based on the blog post mentioned above.

And our proj config file: 

Are we missing additional defines due to using NVS with our own partition? 

Any advice would be appreciated!

Thank you,

Tom

Parents Reply
  • Ah, I see the issue now.

    The flash ends at 0x80000. So you are trying to access an out of range address.

    Try reducing the size of the storage partition to 0x4000, and start the user partition at 7e000.

    &flash0 {
    	partitions {
    		storage_partition: partition@7a000 {
    			label = "storage";
    			reg = <0x7a000 0x4000>;
    		};
    		user_partition: partition@7e000 {
    			label = "userstorage";
    			reg = <0x7e000 0x2000>;
    		};
    	};
    };

Children
No Data
Related