Hi,
we are experiencing unexpected behavior during sleep entry. Following pictures were taken using an oscilloscope, our device sends a radio transmission every 150 ms using external radio IC. The IC is then put to sleep and does so in an expected manner, as we have verified by measuring its current consumption separately. BLE advertising is also enabled with a 100 ms interval. The desired behavior is that system reaches sleep (system on idle mode) between radio transmissions with a ~25 μA current consumption. This current consumption level is achievable with everything turned off.
Now, when using sd_app_evt_wait function, there is a significant delay between the moment the function is entered and the moment current drops to desired value (timings were verified using a debug pin). Most often the 150 ms are not enough to even reach the sleep current. A ~950 ms interval is required to guarantee 100% rate of reaching the 25 μA current level.
When using __WFE() /__SEV() / __WFE() sequence in lieu of sd_app_evt_wait (which is incorrect due to SoftDevice being utilized the whole time), the graphs look like this:
Obviously something (but what? only some PORT event interrupts are enabled and the pin states are perfectly still, all app_timers are stopped at that time) is still delaying the sleep entry, but this time it is reached in every interval. Obviously advertising timing is not working properly.
Any tips on what could be the issue? Communication with the radio IC is done over SPI, which gets disabled after each transmission is complete.
Thanks in advance,
PJ