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
  • How about setting the duty cycle to 0%, and then turn it off?

         uint32_t error_code;
        error_code = low_power_pwm_duty_set(&low_power_pwm_2, 0);
        APP_ERROR_CHECK(error_code);
        error_code = low_power_pwm_stop(&low_power_pwm_2);
        APP_ERROR_CHECK(error_code);
    

    You could also try to set the pin low manually after you call low_power_pwm_stop() :

    nrf_gpio_cfg_output(PIN_OUT );
     nrf_gpio_pin_clear(PIN_OUT );
    
Reply
  • How about setting the duty cycle to 0%, and then turn it off?

         uint32_t error_code;
        error_code = low_power_pwm_duty_set(&low_power_pwm_2, 0);
        APP_ERROR_CHECK(error_code);
        error_code = low_power_pwm_stop(&low_power_pwm_2);
        APP_ERROR_CHECK(error_code);
    

    You could also try to set the pin low manually after you call low_power_pwm_stop() :

    nrf_gpio_cfg_output(PIN_OUT );
     nrf_gpio_pin_clear(PIN_OUT );
    
Children
No Data
Related