nRF52832 & SDK 15.3.0
I have the opposite problem to the one described in https://devzone.nordicsemi.com/f/nordic-q-a/60117/relationship-between-ble_stack_init-and-current-consumption:
My main function with all the radio part commented out:
int main(void)
{
board_init();
set_log_ram_retention();
APP_ERROR_CHECK(nrf_drv_ppi_init());
// enable JLink
NVIC_SetPriority(DebugMonitor_IRQn, _PRIO_SD_LOW);
log_init();
NRF_LOG_INFO("Boot");
timers_init();
configure_wdt();
APP_ERROR_CHECK(nrf_pwr_mgmt_init());
// ble_stack_init();
// gap_params_init();
// gatt_init();
rtc_init();
// services_init();
// conn_params_init();
// peer_manager_init();
// set_mac_address();
// log_mac_address();
scheduler_init();
// delete_bonds();
for (;;)
{
idle_state_handle();
app_sched_execute();
}
}
This yields to a current consumption of about 15uA.
When I uncomment just this line:
ble_stack_init();
the consumption jumps to >400uA:

1. How can I find out if this is due to
A) some CPU activity that doesn't allow entering into sleep mode or is waking up the device too often
or
B) some leakage current drawn by a peripheral module or a pin
2. Where can find a working example of a nRF52832 system which sends data over BT periodically and goes to sleep (System ON, Full RAM retention, Wake on any event) the rest of the time? Or some basic instructions about the necessary conditions to achieve low power with BT enabled?
Here is the ble_stack_init:
/**@brief Function for initializing the BLE stack.
*
* @details Initializes the SoftDevice and the BLE event interrupt.
*/
void ble_stack_init(void)
{
ret_code_t err_code;
err_code = nrf_sdh_enable_request();
APP_ERROR_CHECK(err_code);
// Configure the BLE stack using the default settings.
// Fetch the start address of the application RAM.
uint32_t ram_start = 0;
err_code = nrf_sdh_ble_default_cfg_set(APP_BLE_CONN_CFG_TAG, &ram_start);
APP_ERROR_CHECK(err_code);
// Enable BLE stack.
err_code = nrf_sdh_ble_enable(&ram_start);
APP_ERROR_CHECK(err_code);
// Register a handler for BLE events.
NRF_SDH_BLE_OBSERVER(m_ble_observer, APP_BLE_OBSERVER_PRIO, ble_evt_handler, NULL);
}