1 of 1 people found this helpful
We had the same issue with our firmware running on a 20736.
Our solution is 'simple':
1. when we want to enter deep sleep we set a flag in the NVRAM and reboot the chip
2. when we rebooted we check the that flag from the NVRAM. If it is set then we clear it in the NVRAM and enter deep sleep via bleprofile_PrepareHidOff().
You have to allow waking up from deep sleep with devlpm_enableWakeFrom(DEV_LPM_WAKE_SOURCE_GPIO) before calling bleprofile_PrepareHidOff().
Also make sure that you allow deep sleep in your code. Among other things you should check that a potential callback function registered with devlpm_registerForLowPowerQueries() returns the correct value.