Problems with flash

I'm trying to combine two projects, C:\ncs\v3.1.1\zephyr\samples\subsys\nvs and BleFundamentalsL5E2 (Implement bonding and a Filter Accept List). They work fine independently, but in the combination, if I add CONFIG_SETTINGS=y to prj.conf (necessary for settings_load()), I get the following runtime error (every time nvs_read() is called):    <err> flash_nrf: invalid address: 0x00080ff8:8

Note that CONFIG_SETTINGS=y seems to be the main culprit, but I included the entire prj.conf below:

CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y

CONFIG_NVS=y
CONFIG_LOG=y
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_NVS_LOG_LEVEL_DBG=y
CONFIG_REBOOT=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y

CONFIG_UART_ASYNC_API=y
CONFIG_UART_CONSOLE=y

CONFIG_MAIN_STACK_SIZE=2048
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_NRF_FUEL_GAUGE=y
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="BCI_VM"

# Enable bonding
CONFIG_SETTINGS=y        
CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y


CONFIG_BT_MAX_CONN=2
CONFIG_BT_SMP=y
CONFIG_BT_MAX_PAIRED=2
CONFIG_NCS_SAMPLES_DEFAULTS=y

# Enable the LBS service
CONFIG_DK_LIBRARY=y

Thank you for your attention to this matter

 
Parents
  • Hi Keith

    Vidar uploaded an example project (and the necessary changes) in his reply with the NVS functions nvs_read() and nvs_write(). SInce the project was made for NCS 2.1.1, some changes will likely be necessary for NCS 3.1.1, but the general idea of enabling NVS in the .conf and calling the functions in the main.c file should be the same.

    Best regards,

    Simon

Reply
  • Hi Keith

    Vidar uploaded an example project (and the necessary changes) in his reply with the NVS functions nvs_read() and nvs_write(). SInce the project was made for NCS 2.1.1, some changes will likely be necessary for NCS 3.1.1, but the general idea of enabling NVS in the .conf and calling the functions in the main.c file should be the same.

    Best regards,

    Simon

Children
Related