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

low_power_pwm_stop does not work increasing the consumption by 200 uA

Hello to all

I'm working in an application that needs to be completely power optimized. In this program the device works as a scanner that if it finds an specific device then puts a pwm in a pin, I already got this working with a low_power_pwm. The problem is that when the power_manage function is working, i.e, when the device is almost asleep, the consumption is 240uA, I managed to track 200 uA of this due to the low_power_pwm being activated, tried to use low_power_pwm_stop but didn't work it just keep the pin in a 100% duty, tried the solutions posted here, didn't work. The last thing I tried was sd_power_system_off but without an external wake up call it just stays in deep sleep and I believe even if this woke up with a timer, it wouldn't be a good option for my application. Appreciate any help you can give me, thanks :)

Parents
  • here's the initialization of the low_power_pwm:

    static void pwm_init(void) {
    	uint32_t err_code;
    	low_power_pwm_config_t low_power_pwm_config;
    
    	APP_TIMER_DEF(lpp_timer_2);
    	low_power_pwm_config.active_high = false;
    	low_power_pwm_config.period = 100;
    	low_power_pwm_config.bit_mask = GPIO_OUT_BITMASK;
    	low_power_pwm_config.p_timer_id = &lpp_timer_2;
    
    	err_code = low_power_pwm_init((&low_power_pwm_2), &low_power_pwm_config,
    			NULL);
    	APP_ERROR_CHECK(err_code);
    	err_code = low_power_pwm_duty_set(&low_power_pwm_2, 100);
    	APP_ERROR_CHECK(err_code);
    
    	err_code = low_power_pwm_start((&low_power_pwm_2),
    			low_power_pwm_2.bit_mask);
    	APP_ERROR_CHECK(err_code);
    }
    
Reply
  • here's the initialization of the low_power_pwm:

    static void pwm_init(void) {
    	uint32_t err_code;
    	low_power_pwm_config_t low_power_pwm_config;
    
    	APP_TIMER_DEF(lpp_timer_2);
    	low_power_pwm_config.active_high = false;
    	low_power_pwm_config.period = 100;
    	low_power_pwm_config.bit_mask = GPIO_OUT_BITMASK;
    	low_power_pwm_config.p_timer_id = &lpp_timer_2;
    
    	err_code = low_power_pwm_init((&low_power_pwm_2), &low_power_pwm_config,
    			NULL);
    	APP_ERROR_CHECK(err_code);
    	err_code = low_power_pwm_duty_set(&low_power_pwm_2, 100);
    	APP_ERROR_CHECK(err_code);
    
    	err_code = low_power_pwm_start((&low_power_pwm_2),
    			low_power_pwm_2.bit_mask);
    	APP_ERROR_CHECK(err_code);
    }
    
Children
No Data
Related