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

Turning off peripherals before sleep mode (System ON)

Hi,

Is there an example code for nRF52832 were the system is configured to operate in a certain duty cycle, e.g. performing a certain task once every 100ms, and then goes to sleep mode, but where the current consumption during sleep mode is below 500uA? 

I was using sd_app_evt_wait(); to enter sleep mode, but this by itself doesn't bring me to low current. I still have around 7.5mA consumption. 

Thanks

Parents
  • Hi

    What peripherals are you using in your application? Do you not disable these peripherals at all before going to sleep? Most of our example projects that go to sleep (in system ON mode) use the idle_state_handle() function which calls an NRF_LOG_FLUSH and then the nrf_pwr_mgmt_run() function that prepares the device for sleep mode before calling sd_app_evt_wait().

    Do you really mean 7.5mA? If so, please show me what you did to get that amount of current consumption?

    Best regards,

    Simon

  • I really mean 7.5mA (7500 micro amps). When I go into system OFF mode, the current reduces below 0.1mA, which is the resolution of my current-meter. This means that the other parts of the board (except the nRF52832) consumes less than 0.1mA. 

    I am attaching my code. I am not sure which peripherals are on. 

    #include "rsm_config.h"
    #include "rsm_system.h"
    
    #include "rsm_sample_data.h"
    unsigned int guiSampleIdx = 0;
    
    int main(void)
    {
    	unsigned int uMsecCount = 0;
    	unsigned int err_code = 0;
    	unsigned int uiLedTicks = 0;
    	unsigned int uiButtonState = BUTTON_PRESSED;
    
    	unsigned int uiAdvertisingTimeout = 0;
    
    	unsigned int uiAlgPart = 1;
    
    	// Initialize the nrf log module
    	err_code = NRF_LOG_INIT(NULL);
    	APP_ERROR_CHECK(err_code);
    	NRF_LOG_DEFAULT_BACKENDS_INIT();
    
    	// Initialize the RTT module
    	SEGGER_RTT_Init();
    	SEGGER_RTT_WriteString(0, "RTT initialized\r\n");
    	NRF_LOG_INFO("RSM Application Started");
            
    	// Initialize power management
    	err_code = nrf_pwr_mgmt_init();
    	APP_ERROR_CHECK(err_code);
            
    
    	gSystemStatus = eNoBle;
    
    
            // If I write here nrf_pwr_mgmt_run(); the current consumption reduces below 100 micro-amps
    
    	// Enter main loop
    	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // The main loop consumes 7.5mA (7500 micro-amps).
            
            for (;;)
    	{
            sd_app_evt_wait();
    
    	}
    
    }// end main

Reply
  • I really mean 7.5mA (7500 micro amps). When I go into system OFF mode, the current reduces below 0.1mA, which is the resolution of my current-meter. This means that the other parts of the board (except the nRF52832) consumes less than 0.1mA. 

    I am attaching my code. I am not sure which peripherals are on. 

    #include "rsm_config.h"
    #include "rsm_system.h"
    
    #include "rsm_sample_data.h"
    unsigned int guiSampleIdx = 0;
    
    int main(void)
    {
    	unsigned int uMsecCount = 0;
    	unsigned int err_code = 0;
    	unsigned int uiLedTicks = 0;
    	unsigned int uiButtonState = BUTTON_PRESSED;
    
    	unsigned int uiAdvertisingTimeout = 0;
    
    	unsigned int uiAlgPart = 1;
    
    	// Initialize the nrf log module
    	err_code = NRF_LOG_INIT(NULL);
    	APP_ERROR_CHECK(err_code);
    	NRF_LOG_DEFAULT_BACKENDS_INIT();
    
    	// Initialize the RTT module
    	SEGGER_RTT_Init();
    	SEGGER_RTT_WriteString(0, "RTT initialized\r\n");
    	NRF_LOG_INFO("RSM Application Started");
            
    	// Initialize power management
    	err_code = nrf_pwr_mgmt_init();
    	APP_ERROR_CHECK(err_code);
            
    
    	gSystemStatus = eNoBle;
    
    
            // If I write here nrf_pwr_mgmt_run(); the current consumption reduces below 100 micro-amps
    
    	// Enter main loop
    	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // The main loop consumes 7.5mA (7500 micro-amps).
            
            for (;;)
    	{
            sd_app_evt_wait();
    
    	}
    
    }// end main

Children
No Data
Related