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:



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)
            for(rc = 0; rc< 100;rc++)
                    while(sd_flash_page_erase(119 + rc) != NRF_SUCCESS);

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?

  • Hi,

    If the bootloader is at 0xE0000, three FDS pages of size 1024 (1024 words, which is 4096 bytes, or 0x1000 bytes in hexadecimal) would start at 0xDD000, 0xDE000 and 0xDF000.

    Your code erasing flash pages erases the flash pages starting at 0x77000 to starting at 0xDA000.

    What why you need to erase, are the flash pages used by FDS. In this case that should be pages 221, 222 and 223.

    The reason you need to erase them, is that FDS needs those pages not to be used in order to initialize properly. If the pages contain erroneous data, FDS may either not use the page at all (FDS assumes the page contains other data that it should not tamper with) or the page header looks correct to FDS and FDS tries to parse the page (but the contents are corrupt.)

    While the Dongle has some use cases also for development work, it is not a full development platform and so debugging and figuring out what is going on might be a bit difficult at times. In general I would recommend to either develop on a DK, or to connect to the Dongle from a J-Link debugger (such as the one onboard the DK, either through use of a Tag Connect cable, soldering, or otherwise.)


Reply Children