Hi, currently I'm working on ultra low power device. This device need to be wake up in 333 ms interval. I use RTC for this. My question is about strange current spikes with i observed on Nordic Power Profiler Kir ( nRF6707 ). What is a source for this spikes?
This spikes have interval ~25ms. Average current looks quite OK: System on ( 1.2uA)+ RC ( 1uA ) + RTC ( 0.1 uA ) = 2.3 uA I'm not use any soft device. I use internal RC clock source for LFC.
My code is very simple: main:
int main(void)
{
NRF_POWER->DCDCEN = 1;
lfclk_config();
rtc_config();
while (1)
{
power_manage();
}
}
rtc_config:
static void rtc_config(void)
{
uint32_t err_code;
nrf_drv_rtc_config_t config = NRF_DRV_RTC_DEFAULT_CONFIG;
config.prescaler = 64; // 32 768 Hz / 38 = 1024 Hz
err_code = nrf_drv_rtc_init(&rtc, &config, rtc_handler);
APP_ERROR_CHECK(err_code);
nrf_drv_rtc_cc_set(&rtc,0, MEASURMENT_TIME_MS, true);
nrf_drv_rtc_counter_clear(&rtc);
nrf_drv_rtc_enable(&rtc);
}
RTC handler, power manage and lfck config:
#define MEASURMENT_TIME_MS 333
const nrf_drv_rtc_t rtc = NRF_DRV_RTC_INSTANCE(2);
static void rtc_handler(nrf_drv_rtc_int_type_t int_type)
{
if (int_type == NRF_DRV_RTC_INT_COMPARE0)
{
nrf_drv_rtc_cc_set(&rtc,0, MEASURMENT_TIME_MS, true);
nrf_drv_rtc_counter_clear(&rtc);
}
}
static void power_manage( void )
{
// WFE - SEV - WFE sequence to wait until a radio event require further actions.
__WFE();
__SEV();
__WFE();
}
static void lfclk_config(void)
{
ret_code_t err_code = nrf_drv_clock_init();
APP_ERROR_CHECK(err_code);
nrf_drv_clock_lfclk_request(NULL);
}
Does anyone know what could be the source of this spikes? RC temperature corecction? Nordic power profiler kit bug?