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

peer_manager_pds: Could not initialize flash storage. fds_init() returned 0x860A

When the application is started I get the following error:

<error> peer_manager_pds: Could not initialize flash storage. fds_init() returned 0x860A.
00>
00> <error> peer_manager: pm_init failed because pds_init() returned NRF_ERROR_STORAGE_FULL.
00>
00> <error> app: ERROR 3 [NRF_ERROR_INTERNAL] at C:\Users\Samo\Documents\nRF52_SDK\examples\ble_peripheral\ble_Indu4s_improved3\main.c:2689
00>
00> PC at: 0x0002065B
00>
00> <error> app: End of error report

In my application, I wrote some data in flash. More precisely, I reserved 8kB for my data from 0x2E000 to 0x30000. This is 8kB which means that I have two pages. The first page goes from 0x2E000 to 0x2F000and from 0x2F000 to  0x30000. Because I use the nrf52811 chip (s112) these flash addresses are located at the end of the flash. Now comes the most interesting part. If I erase the flash before peer_manager_init is called then the error does not occur. Due to this fact, I believe that the problem is somehow related to the flash but I do not know what exactly can be the cause of the problem. According to my knowledge the flash addresses above 100kB and not reserved. I will appreciate for help.

err_code = nrf_fstorage_erase(&fstorage, 0x2F000, 1,NULL);
APP_ERROR_CHECK(err_code);
wait_for_flash_ready(&fstorage);

Here is my memory layout. Why such periodicity occurs at the top of flash memory? This periodicity is generated when peer_manager_init() method is called.

Parents Reply Children
  • Thanks for the reply. Every time I load the program the entire flash is erased. Due to this fact, I think that this is not the problem. I am wondering why error NRF_ERROR_STORAGE_FULL is thrown from pm_init method. If the problem lies in the fact that the pages are not erased then fstorage_init should throw an error and not peer_manager_init(). Which addresses the peer_manager occupies for storing the data in the flash? Thanks for your help in advance.

  • Hi,

    control said:
    Every time I load the program the entire flash is erased.

    How do you erase the entire flash?

    Do you run 'nrfjprog --eraseall' command on your board or Erasing the kit before flashing the application?

    control said:
    If the problem lies in the fact that the pages are not erased then fstorage_init should throw an error and not peer_manager_init(). Which addresses the peer_manager occupies for storing the data in the flash?

    <error> peer_manager_pds: Could not initialize flash storage. fds_init() returned 0x860A.

    The log indicates the error comes from fds_init(). Error 34314 (0x860A) means FDS_ERR_NO_PAGES. Does pages_init() return NO_SWAP and fds_init() quit with FDS_ERR_NO_PAGES? If so, it seem you didn't erase the page fully at first, and the nrf_fstorage_erase did that later. 

     -Amanda H.

  • The chip is erased with the help of Erasing the kit.  I have one concern regarding erasing the chip. Please let me know if I have to erase the chip just the first time or every time it is restarted. At the moment, I erase the chip just the first time (this is actually done with the help of Erasing the kit and in code) and then I start adding some data in flash.  if I reset the chip I get the mentioned problem. Please note, when the module is reset the erase function is not called just read the data from flash.  Is it ok or I have to ease the flash every time it is reset of course after the data are read from flash.

  • Hi,

    Do you see any errors? 

    Reset will not erase the device/flashIf you initial FDS after the reset, it might be better to erase the flash every time. 

    -Amanda H.

  • I observed the following situation. I using flash on the following addresses

    #define FLASH_START_ADD 0x2E000

    #define FLASH_HISTORY_ADD 0x2F000
    #define FLASH_END_ADD 0x2FFFF

    It means that my entire space is 8kB which means that 2 pages are reserved just for arbitrary data. If the write and the read command is executed in the first page address starts at 0x2E000 I do not get any kind of error even the chip is restarted. The error occurs just in case when the writing command is executed on address 0x2F000 ahead. I am wondering why erasing is not necessary after the chip restarts as long as the flash is used just on the first page.

    I do some additional tests. I changed the range of flash to one 4kB which is one page and addresses are the following ones

    #define FLASH_START_ADD 0x2E000
    #define FLASH_END_ADD  0x2EFFF

    when I check the flash without peer_manager_init it shows that the addresses which I reserved for my data are reserved and this behavior is expected.  If I add peer_manager_init and do not change FLASH_START_ADD and FLASH_END_ADD constants the addresses 0x2F000 and ahead are reserved. I suspect that this reservation id made by peer_manager_init, is it true?  Why these addresses are reserved and who reserved them? As I asked in my previous post, which flash memory is reserved for peer_manager?

Related