Nenik: Re-enable SD specific sleep path, related to #165

When the SoftDevice is active (e.g. as soon as you call Bluefruit.begin()),
standby by __WFE seems to keep external Xtal oscillator running
(at least on nRF52832), increasing the standby power consumption
by 500-800uA. The SD-enabled path was apparently disabled mistakenly
by Nordic, see Nordic post for reference:
https://devzone.nordicsemi.com/f/nordic-q-a/35073/high-power-consumption-of-softdevice/136048#136048
This commit is contained in:
Petr Nejedly committed 2020-08-12 22:04:30 -07:00
1 parent a5afbec143
commit 3ada760cef
1 file changed
-2
@@ -182,7 +182,6 @@ void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )
configPRE_SLEEP_PROCESSING( xModifiableIdleTime );
if ( xModifiableIdleTime > 0 )
{
#if 0 // With FreeRTOS sd_app_evt_wait increases power consumption with FreeRTOS compared to _WFE (NRFFOSDK-11174)
#ifdef SOFTDEVICE_PRESENT // TODO
uint8_t sd_en = 0;
(void) sd_softdevice_is_enabled(&sd_en);
@@ -193,7 +192,6 @@ void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )
}
else
#endif
#endif // (NRFFOSDK-11174)
{
/* No SD - we would just block interrupts globally.
* BASEPRI cannot be used for that because it would prevent WFE from wake up.