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

nrf52832 sleep mode else if (DMP_acq == 0) { app_timer_start(m_timer, APP_TIMER_TICKS(1000), NULL); // timer one shoot - events will wake up the sensor // Put the CPU to sleep until an interrupt is detected.

Hi,

I have develop an application using the nrf52832 combined wit the ICM20948 sensor.  

The application use ESB communication between peripheral and central.  I have solder 10 ohm resistor between the nrf52 board  and the nominal 3V , and another one between the ICM20948 board and  the 3 V supply.

When the ICM is not in used,  I want to put the nrf52 in sleep mode for one second.  The nrf52 then wake up and send the battery level to the central to keep communication going and also pickup new instruction from the returning acknowledge.  This is the portion of the code use for the standby :

    else if (DMP_acq == 0)    
           {  app_timer_start(m_timer, APP_TIMER_TICKS(1000), NULL);  //  timer one shoot  - events will wake up the sensor 
          
            // Put the CPU to sleep until an interrupt is detected.   (data or timer)                    
            // Make sure any pending events are cleared
            __SEV();
            __WFE();
            // Enter System ON sleep mode
            __WFE();
               
       
            } 

When in standby, I measure about 47 mV across the nrf52 10 ohm resistor. That would give about 4.7 mA. The ICM chip is almost at 0 mA.     Number goes up approx to 7.5mA for the nrf52 board and 5 mA for the ICM board (12.5 mA) when sampling values at 56 Hz.  

I suspect that I am doing something wrong. I would expect low uA value when the nrf52 is in standby, no sampling going on, using the above code .

I have seen a post with the following calculation:

System ON, no RAM retention + RTC + LFRC = 1.2uA + 0.1uA + 0.6uA = 1.9uA

I have RTC and LFRC, working for timestamp and +,  nrf_clock for ESB


 What am I doing wrong ?

(Note : Not sure what is no ram retention, should I clear the memory before going to sleep ?)

Thanks you in advance for your help.  It's truly appreciated.

  • I am using SDK16.  

    Yes nrf_drv_clock_release don't do the same as NRF_CLOCK->TASKS_HFCLKSTOP = 1;

    The hfclk is only used by ESB...

    The clock is start this way, as in the ESB exemple: esb_low_power_prx

    void clocks_start( void )
    {
        NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
        NRF_CLOCK->TASKS_HFCLKSTART = 1;
        while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0);
    }

    Could you please check the power consumption of the exemple  esb_low_power_prx and tell me what value you get?

  • Try to debug when you call nrf_drv_clock_hfclk_release(), and check the value of m_clock_cb.hfclk_requests after it is decremented, and whether hfclk_stop() is called or not. 

    If it is not, then there is either something else in your project that has requested the clock, or the issue may be that noone has requested the clock. Calling clocks_start() doesn't request the clock. Perhaps one of the asserts are triggered, and the application resets starting the clock again?

Related