Hello I am seeing some excessive current consumption (~650uA) when connected and do not know where it is coming from. I am using a custom board with an external 32 MHz crystal for the HFCLK and no crystal for the LFCLK, so I am planning on using the internal RC for this. I am using the softdevice S132 as it is configured in the example project.
I started with the Blinky peripheral example and modified the sdk_config.h file to the following:
// <0=> NRF_CLOCK_LF_SRC_RC #define NRF_SDH_CLOCK_LF_SRC 0 #define NRF_SDH_CLOCK_LF_RC_CTIV 16 NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2 // <1=> NRF_CLOCK_LF_ACCURACY_500_PPM #define NRF_SDH_CLOCK_LF_ACCURACY 1 #define NRFX_CLOCK_ENABLED 1 // <0=> RC #define NRFX_CLOCK_CONFIG_LF_SRC 0
I am able to successfully connect to the client (nRF Blinky App) on my iOS device.
I have also added the following code in my main() function prior to timer_init(), ble_stack_init(), gap_parameters_init() and all other function calls:
NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_EXTERNAL_Disabled << CLOCK_LFCLKSRC_EXTERNAL_Pos | CLOCK_LFCLKSRC_BYPASS_Disabled << CLOCK_LFCLKSRC_BYPASS_Pos | CLOCK_LFCLKSRC_SRC_RC << CLOCK_LFCLKSRC_SRC_Pos ); NRF_CLOCK->TASKS_LFCLKSTART = 1; while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0) { // Wait for the low frequency clock to start } NRF_CLOCK->EVENTS_LFCLKSTARTED = 0; NRF_CLOCK->TASKS_HFCLKSTOP = 1; nrf_delay_ms(1);
650uA seems to be very high average current consumption for just having the softdevice enabled and the App Timer running off of internal RC. Could someone help?