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

Peer Manager fails to initialize

I am getting errors when initializing the Peer Manager in my code.  Here are the items that are unique to my setup:

1) I have a thread which uses fstorage to store a single page of values @ addresses 

#define FLASH_STORAGE_START_ADDRESS 0x6F000
#define FLASH_STORAGE_END_ADDRESS 0x70000

2) I store a few arrays directly into flash via the linker file.  These are stored at 0x73D00 to 0x80000

I've tried modifying the fds.c code to hardcode the m_fs.end_addr.  This fixed the Flash range from 0x70000 to 0x73000.  So as far as I can tell there are so corruptive overlaps. 

Inside fds_init(),  pages_init() returns a FRESH_INSTALL return code.  Later in the function queue_buf_get() is where everything goes awry and I get a SOFTDEVICE: INVALID MEMORY ACCESS error trap.

Parents Reply
  • Hi,

    I'm sorry for the delay. Have you had any progress on this? If not, please check what the value of the "info" argument is when you get the NRF_FAULT_ID_APP_MEMACC assertion. I suspect it's a RAM access violation if it fails on queue_buf_get(), but it would be nice to confirm.

    "The info parameter will contain 0x00000000,
    in case of SoftDevice RAM access violation. In case of SoftDevice peripheral
    register violation the info parameter will contain the sub-region number of
    PREGION[0], on whose address range the disallowed write access caused the
    memory access fault. */"

    What IDE/toolchain and SDK are you using? Maybe you could try to add your fstorage implementation to another SDK example such as ble_app_hrs and see if you get the same result? If you do I can try to debug it here.

Children
No Data
Related