This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Softdevice - nRF timer causes an increase in current consumption.

Hello,

I am using nRF52833 based BE33 (Celium Devices) and using nRF52SDK17.0.2. I am trying to implement my firmware which will consume less current. I have implemented SYSTEM_ON sleep and it consumes average current consumption <~100 uA BLE is ON.

Next, I have implemented an nRF Timer and have noticed that if I uncomment out the timer code which has nothing is written (idle) in its handler executing after every 10 seconds is consuming around average 500uA+ means a total 600uA average. but when I comment it out then I am getting above <~100uA current average.

It should go into SYSTEM_ON sleep mode during that 10 seconds.

Here is my timer code:

void timer0_handler(nrf_timer_event_t event_type, void *p_context)
{
    switch (event_type)
    {
        case NRF_TIMER_EVENT_COMPARE3:{
         
            break;
            }
        default:
            break;
    }
          
}

void timer_init(){
const nrfx_timer_t TIMER_LED = NRFX_TIMER_INSTANCE(3); // Timer 0 Enabled
  uint32_t time_ms = LOADCELL_ACT_INTERVAL*1000; //Time(in miliseconds) between consecutive compare events.
    uint32_t time_ticks;
    uint32_t err_code = NRF_SUCCESS;
      nrf_drv_timer_config_t timer_cfg = NRF_DRV_TIMER_DEFAULT_CONFIG;
    err_code = nrf_drv_timer_init(&TIMER_LED, &timer_cfg, timer0_handler);
    APP_ERROR_CHECK(err_code);

    time_ticks = nrf_drv_timer_ms_to_ticks(&TIMER_LED, time_ms);

    nrf_drv_timer_extended_compare(
         &TIMER_LED, NRF_TIMER_CC_CHANNEL3, time_ticks, NRF_TIMER_SHORT_COMPARE3_CLEAR_MASK, true);

    nrf_drv_timer_enable(&TIMER_LED);
}

int main(void)
{
power_management_init();
startBLEAdvertising();
timer_init();

for (;;)
   {
       idle_state_handle();
   }
}

Please help me.

Thanks and regards,

Neeraj Dhekale

Related