Idle power consumption jumps up following the very first distance measurement

The idle power consumption (i.e. the current draw between adverts) is 2.4uA prior to the first call of dm_request_add() following reset.

Once a distance measurement has taken place (i.e. dm_request_add() has been called), the idle power consumption increases to 8.8uA and never returns to the original value of 2.4uA.



No other changes were made to the code between the two screenshots, other than commenting out the call to dm_request_add.

Is this because a peripheral e.g. 
ncs,dm-timer = &timer2; continues to run when it shouldn't?

  • Hi Matthew

    Yes, most likely this is due to the timer or another peripheral instance not being disabled correctly after a distance measurement. Can you confirm that the device is successfully disconnected from the other when this excess power consumption occurs, and what NCS version are you working on when seeing this? Are you measuring this using an nRF52833 DK or custom board?

    Best regards,

    Simon

  • Hi Simon,

    Yes, the device is successfully disconnected from the other device. I'm using NCS version 2.7.0. I am measuring this with a custom board which has literally no other components beside the nRF52833 (and its supporting circuitry).

  • I have solved this issue. It relates to Errata 78 i.e. the timer has been running (after triggering a START task) and then it is stopped using a STOP task only.

    I have added the following code to the .data_ready callback to ensure the SHUTDOWN task is issued to the ncs_dm_timer:

    #if DT_HAS_CHOSEN(ncs_dm_timer)
    #define DM_TIMER ((NRF_TIMER_Type *)DT_REG_ADDR(DT_CHOSEN(ncs_dm_timer)))
    #else
    #warning "The ncs,dm-timer chosen node is not set; defaulting to TIMER2"
    #define DM_TIMER NRF_TIMER2
    #endif
    
    static void data_ready(struct dm_result *result)
    {
    	DM_TIMER->TASKS_SHUTDOWN = 1;
Related