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

power consumption problem

Hi,

I'm using nrf51822 / sd130 / sdk 12.1. I am doing minimizing current consumption. My main function is like below. I checked no wakeup in sleep mode. But, current consumption changes variously. It is wide from ~30uA to 1.5mA. What should I do additionally? I'm trying various condition.

thanks.


while (1)
{
        // fucntion execute


	NRF_CLOCK->TASKS_HFCLKSTART = 0;       // for test
	NRF_CLOCK->TASKS_HFCLKSTOP = 1;        // for test

	NRF_POWER->TASKS_LOWPWR = 1;           // for test
//	NRF_POWER->SYSTEMOFF = 1;              // for test

	// Make sure any pending events are cleared
	__SEV();
	__WFE();
	// Enter System ON sleep mode
	__WFE();

         // watchdog
	nrf_drv_wdt_channel_feed(m_channel_id);	// wdt feed

	NRF_CLOCK->TASKS_HFCLKSTOP = 0;        // for test
	NRF_CLOCK->TASKS_HFCLKSTART = 1;       // for test
   }

watchdog setting

// <1=> Run in SLEEP, Pause in HALT 
// <8=> Pause in SLEEP, Run in HALT 
// <9=> Run in SLEEP and HALT 
// <0=> Pause in SLEEP and HALT 

    #ifndef WDT_CONFIG_BEHAVIOUR
    #define WDT_CONFIG_BEHAVIOUR 8					// 8, mtkim modified, 1 : original
    #endif
Parents
  • *** 1st question *** I use timer1/2 for 2 - PWM. I turn on(POWER = 1) each timer before PWM start(init()) and turn off(POWER = 0) each timer after PWM stop(uninit()). I get current save by doing this. But, Reset occurs after several above PWM action - mainly when PWM1 is called. I use makeSound() to change beep sound level. It’s called by different sound level. I don’t know there is anything wrong. Sure, reset never occurs without using turn on/off.


    ENABLE_TIMER1;

    void makeSound(uint16_t level) // PWM1 { ret_code_t err_code;

    app_pwm_uninit(&PWM_BUZZER);
    app_pwm_config_t pwm1_cfg = APP_PWM_DEFAULT_CONFIG_1CH(level, BUZZER_PIN);
    pwm1_cfg.pin_polarity[0] = APP_PWM_POLARITY_ACTIVE_HIGH;
    
    err_code = app_pwm_init(&PWM_BUZZER, &pwm1_cfg, NULL);
    APP_ERROR_CHECK(err_code);
    app_pwm_enable(&PWM_BUZZER);
    

    }


    *** 2nd question *** I set CLOCK_CONFIG_LF_SRC 0 (RC). This makes current consumption be lower than XTAL setting. Is XTAL setting essential in BLE function environment? Is calibration essential for the exact timing (RTC)? I don’t want calibration for lower current consumption.

Reply
  • *** 1st question *** I use timer1/2 for 2 - PWM. I turn on(POWER = 1) each timer before PWM start(init()) and turn off(POWER = 0) each timer after PWM stop(uninit()). I get current save by doing this. But, Reset occurs after several above PWM action - mainly when PWM1 is called. I use makeSound() to change beep sound level. It’s called by different sound level. I don’t know there is anything wrong. Sure, reset never occurs without using turn on/off.


    ENABLE_TIMER1;

    void makeSound(uint16_t level) // PWM1 { ret_code_t err_code;

    app_pwm_uninit(&PWM_BUZZER);
    app_pwm_config_t pwm1_cfg = APP_PWM_DEFAULT_CONFIG_1CH(level, BUZZER_PIN);
    pwm1_cfg.pin_polarity[0] = APP_PWM_POLARITY_ACTIVE_HIGH;
    
    err_code = app_pwm_init(&PWM_BUZZER, &pwm1_cfg, NULL);
    APP_ERROR_CHECK(err_code);
    app_pwm_enable(&PWM_BUZZER);
    

    }


    *** 2nd question *** I set CLOCK_CONFIG_LF_SRC 0 (RC). This makes current consumption be lower than XTAL setting. Is XTAL setting essential in BLE function environment? Is calibration essential for the exact timing (RTC)? I don’t want calibration for lower current consumption.

Children
No Data
Related