FDS_ERR_NO_PAGES problem

Hi,

i have PCA10059 dongle board. when i want run my program on it, fds_init return FDS_ERR_NO_PAGES. and also in nrf connect i can see range of different application parts as below:

MBR -> 0x0, 0x1000

Soft Device -> 0x1000, 0x26000

Application -> 0x26000,  0x7611c

Bootloader -> 0xE0000, 0xFE000

and also my FDS setting is as below:

#ifndef FDS_VIRTUAL_PAGES
#define FDS_VIRTUAL_PAGES 3
#endif

#ifndef FDS_VIRTUAL_PAGE_SIZE
#define FDS_VIRTUAL_PAGE_SIZE 1024
#endif

so i think that have enough flash for 3 page. and also i ran below code when FDS_ERR_NO_PAGES  error returned.

rc = fds_init();
    #ifdef BOARD_PCA10059
    //if we did not find any free page, we will reset some pages
    if(rc == FDS_ERR_NO_PAGES)
    {
            bsp_board_led_on(3);
            for(rc = 0; rc< 100;rc++)
            {
                    while(sd_flash_page_erase(119 + rc) != NRF_SUCCESS);
            }
            bsp_board_led_off(3);
            while(1);
    }
    #endif
    APP_ERROR_CHECK(rc);

in above code i try to remove some flash pages when problem occur but even with above code FDS_ERR_NO_PAGES problem did not solved and in the next reset i again receive FDS_ERR_NO_PAGES error.

there is any way to solve problem?

Related