This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Low Power Consumption for the first 10 seconds on nRF52832

Hello,

we are developing an application with a nRF52832 on a custom board. The application works fine. The application on the nRF52832 consumes 2.2mA @ 2.5V.

The other components on our custom PCB and the power supply requires that we start our application on the nRF52832 with a delay of about 10 seconds. The power supply are weak zinc-air batteries. Adding capacitance is not possible in our case.

Otherwise the total current consumption of the PCB in the first seconds is too high.

This means that our nRF52832 gets power and has to stay then for about 10 seconds in a state, where it only draws a few 100 µA. We need no functionality in this first 10 seconds.

Our question: Is there a way to achieve, that our nRF52832 draws only a few 100 µA without any functionality for about 10 seconds after it gets power?

Thank you very much in advance.

Best regards,

Michael

Parents
  • Our question: Is there a way to achieve, that our nRF52832 draws only a few 100 µA without any functionality for about 10 seconds after it gets power?

    Nope.

    The reset state needs current in the mA range for the chip to turn on properly.

    Remember that you start with clocks and core enabled and excuting code, and the chip can only go into low power state after the initial setup on power-on.

  • Hello Turbo J.,

    thank you very much for your reply.

    I think I have to be more specific on my problem:

    My power supply on my board can indeed handle the first 2 seconds when the nRF52 starts-up.

    But then I should go into a low power state with no functionality for about 10 seconds with a current consumption of a few 100 µA.

    Basically I am searching for a low power alternative to this: 

    int main(void)
    {
        nrf_delay_ms(10000);
        ...
    }

    Do you have any idea how to achieve this?

    Sorry for my previous unclear question.

    Best regards,

    Michael

  • Can trivially done with app_timer module (this supports both one-shot and repeating timers).

    volatile bool run_init=false;
    
    static void TimeoutSekunde(void * context){
      run_init=true;
    }
    
    int main() {
    
      app_timer_create(&initTimerID, APP_TIMER_MODE_SINGLE_SHOT,TimeoutInit);
      app_timer_start(&initTimerID, APP_TIMER_TICKS(10000),NULL);
      
      while (1) {
        if (run_init) { 
          do_run_init();
          run_init= false;
        }
        idle_state_handle();
      }
    }

  • Hello,

    thank you very much for your reply.

    I implemented a one-shot app_timer:

    APP_TIMER_DEF(initTimer);
    volatile bool run_init=false;
    
    static void timers_init(void)
    {
        ret_code_t err_code = app_timer_init();
        APP_ERROR_CHECK(err_code);
    }
    
    static void TimeoutInit(void * context)
    {
        run_init=true;
    }
    
    int main(void)
    {
        ret_code_t error_code;
    
        enable_DCDC();
        
        uart_init();
        log_init();
        timers_init();
    
        app_timer_create(&initTimer, APP_TIMER_MODE_SINGLE_SHOT,TimeoutInit);
        APP_ERROR_CHECK(error_code);
        app_timer_start(initTimer, APP_TIMER_TICKS(10000),NULL);
        APP_ERROR_CHECK(error_code);
    
        if (run_init == true)
        {
        ...
    }

    Unfortunately, the timeout-handler TimeoutInit(...) gets never called.

    Do you have any suggestions what could cause this behaviour?

    Thank you very much in advance.

    Best regards,

    Michael

  • Hello again Turbo J,

    my app_timer and its callback work now.

    I had to add and call the following, before I create my APP_TIMER:

    static void lfclk_config(void)
    {
        NRF_CLOCK->LFCLKSRC             = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos);
        NRF_CLOCK->EVENTS_LFCLKSTARTED  = 0;
        NRF_CLOCK->TASKS_LFCLKSTART     = 1;
        while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0)
        {
            //Do nothing.
        }
        NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;
    }

    My main() function looks like the following now:

    int main(void)
    {
        enable_DCDC();
        
        ret_code_t error_code;
    
        lfclk_config();
        log_init();
        timers_init();
        
        app_timer_create(&initTimer, APP_TIMER_MODE_SINGLE_SHOT,TimeoutInit);
        APP_ERROR_CHECK(error_code);
        app_timer_start(initTimer, APP_TIMER_TICKS(10000),NULL);
        APP_ERROR_CHECK(error_code);
    
        while(1)
        {
            if (run_init == true)
            {
                run_init = false;
                ... // Init All
            }
            idle_state_handle();
        }
    }

    Unfortunately, my current consumption is still at ~2mA during this 10 seconds.

    Do you have any suggestions what could cause this behaviour?

    Thank you very much in advance.

    Best regards,

    Michael

Reply
  • Hello again Turbo J,

    my app_timer and its callback work now.

    I had to add and call the following, before I create my APP_TIMER:

    static void lfclk_config(void)
    {
        NRF_CLOCK->LFCLKSRC             = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos);
        NRF_CLOCK->EVENTS_LFCLKSTARTED  = 0;
        NRF_CLOCK->TASKS_LFCLKSTART     = 1;
        while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0)
        {
            //Do nothing.
        }
        NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;
    }

    My main() function looks like the following now:

    int main(void)
    {
        enable_DCDC();
        
        ret_code_t error_code;
    
        lfclk_config();
        log_init();
        timers_init();
        
        app_timer_create(&initTimer, APP_TIMER_MODE_SINGLE_SHOT,TimeoutInit);
        APP_ERROR_CHECK(error_code);
        app_timer_start(initTimer, APP_TIMER_TICKS(10000),NULL);
        APP_ERROR_CHECK(error_code);
    
        while(1)
        {
            if (run_init == true)
            {
                run_init = false;
                ... // Init All
            }
            idle_state_handle();
        }
    }

    Unfortunately, my current consumption is still at ~2mA during this 10 seconds.

    Do you have any suggestions what could cause this behaviour?

    Thank you very much in advance.

    Best regards,

    Michael

Children
No Data
Related