Hi,
I have an issue with bonding and resetting my BLE Peripheral device (NRF52832) after the bonding process is complete. Currently I press a button that initiates the bonding procedure, after that the central device (e.g my smartphone) bonds with the the peripheral device. When the bonding is complete I tell the BLE Peripheral to reset itself and update the whitelist and advertise using the whitelist by fetching the bonding information from flash. That part works fine, however when I connect with the central device after the reset i get the error: PM_EVT_LOCAL_DB_CACHE_APPLY_FAILED event inside the peer manager event handler. The central device can still connect though.
I dont get the error PM_EVT_LOCAL_DB_CACHE_APPLY_FAILED if I: connect -> bond -> reconnect (without restart of BLE Peripheral). But if I do connect-> bond -> disconnect -> connect -> reset -> connect the error shows up again.
I've tried using timers to delay the reset since writing to flash is done asynchronously (thinking maybe the reset was done too quickly) but it did not help.
Quick Edit:
Im using SDK V15.0
Softdevice: S132 6.0
Hardware: nRF52832