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?

Parents
  • 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;
Reply
  • 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;
Children
No Data
Related