This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52840 - FDS init FDS_ERR_NO_PAGES problem (SDK 15.0.0)

Hi everyone,

My hw/sw configuration:

- nRF52840
- sdk 15.0.0
- softdevice: s140_nrf52_6.0.0
- bootloader + softdevice + application

We're in production stage and we're encountered some problems with the data stored in FDS area.
In particular, in some products fds_init() function return FDS_ERR_NO_PAGES error. 

Below, the FDS initialization function:

bool int_flash_init(void){
	ret_code_t ret = FDS_SUCCESS;

	ret = fds_register(fds_evt_handler);
	if (ret != FDS_SUCCESS)
	{
	    NRF_LOG_ERROR("Registering of the FDS event handler has failed.");
		return false;
	}

	ret = fds_init();
	if (ret != FDS_SUCCESS)
	{
	    NRF_LOG_ERROR("FDS handle init error = 0x%x", ret);
		return false;
	}

	return true;
}

I try to read the memory area using "nrfjprog --memrd" command and the memory content is not corrupted. The data are valid but the fds_init return error.

Please, could you help me?
Could you suggest me a "workaround" to correctly initialize the FDS area? I don't want and I can't erase the memory otherwise the product will lost important configuration data.

Thanks

Parents Reply
  • You need to increase the FDS_VIRTUAL_PAGES count in your sdk_config.h file as written here. to solve the problem with NO_PAGES error.

    But i think when you recompile and flash the new application, the debugger will overwrite the FDS reserved flash area.

    II think the best is to use a new bootloader and flash the new bootloader with DFU_APP_DATA_RESERVED set to the number equal the FDS number of pages. After you flash the new bootloader, use the OTA firmware upgrade to flash the new application that updates the application but keeps the FDS specific app data.

Children
Related