Hi,
I'm trying to add the peer manager to my project, following the guidelines at infocenter.nordicsemi.com/index.jsp
I've copied the peer_manager_init() function exactly as shown in the guidelines, but when run the call to pm_init() always returns an error code 3 which is NRF_ERROR_INTERNAL. Single-stepping inside pm_init using the debugger shows that the error seems to originate in a call to pdb_register() which returns error 4 (NRF_ERROR_NO_MEM).
Is there some other initialisation or configuration I need to do before attempting to call pm_init?
UPDATE: Digging deeper, the error seems to occur at the following lines in the fds_init function (called by pdb_register via a call to pds_register):
// Initialize the page table containing all info on pages (address, type etc).
pages_init(&pages_avail, &write_page_tag, &resume_compression);
if (pages_avail == 0 && !write_page_tag)
{
return NRF_ERROR_NO_MEM;
}
It looks as if pages_avail is zero leading to the NRF_ERROR_NO_MEM error.