This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

High background current after disabling PWM in SoftDevice

The question is: how to completely turn off PWM in SoftDevice?

I am using the libraries nrf_pwm.h and nrf_pwm.c in this repo for PWM with SoftDevice. Everything seems to work fine (e.g., I can enable up to 4 PWM channels through PPI) except that there is ~ 0.3mA continuous background current after I disable PWM with the function call

nrf_pwm_set_enabled(false); 

The content of nrf_pwm_set_enabled() can be found here. I can confirm the background current was only a few uAs before I enabled and disabled PWM, so this ~0.3mA should be related to PWM. I can see the PWM timers are turned off in nrf_pwm_set_enabled(false). Is there anything else that should be turned off to eliminate this 0.3mA current?

  • @diode: I found the issue with the example code in the repo is that we forgot to disable the PAN#73 workaround when we disable the pwm. So if you add:

    apply_pan73_workaround(PWM_TIMER, false);

    and apply_pan73_workaround(PWM_TIMER2, false); (if you use 2 timers)

    to the nrf_pwm_set_enabled() function when disabling.

    Then the 300mA extra current consumpt should be removed.

    Also adding PWM_TIMER->TASKS_SHUTDOWN = 1; could reduce the power consumption a little bit more.

Related