Bonding causes power consumption to rise.
I have a central and peripheral device communicating using the nus-service. The peripheral device is running FreeRTOS with tickless idle.
When the peripheral device is advertising or connected to the central without beeing bonded; it consumes about 0,6mA (OK)
The moment the central device initiates bonding, the current consumption on the peripheral rises to 6,7mA and stays there, even if I disconnect the central again. I am not sure if it is the bonding itself that causes this, but it's initiating the problem.
I'm assuming that something is causing the device not to fall asleep properly. If I don't initiate the peer manager (no bonding), then its ok. I read that it could be that interrupts are pending when calling sd_app_evt_wait() and it therefore returns immediatley. I don't know however which interrupt this is or what the peer manager is doing that enables such an interrupt? Could it be flash related? Any suggestions? The ISPR[0] is 0x00024000 most of the time when breaking at sd_app_evt_wait() during a connection.
EDIT: Using SDK v11.0.0, s132_nrf52_2.0.0, NRF52832, IAR 7.50.3
Best Regards, Erik.