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

app_pwm high current consumption - SDK12

Hi guys,

So as I'm migrating from SDK10 to SDK12 I've noted that the app_pwm module is consuming more power then expected while disabled ~300uA. After initialization, I do not see any increase in idle current, but once I start the PWM, after stopping the idle current increases to ~300uA. I used the following for my pwm_stop()

void pwm_stop() { app_pwm_disable( &PWM );

nrf_drv_gpiote_out_task_disable( pin_1 );
nrf_drv_gpiote_out_task_disable( pin_2 );

app_pwm_uninit( &PWM );

nrf_gpio_cfg_output( pin_1 );
nrf_gpio_pin_clear( pin_1 );

nrf_gpio_cfg_output( pin_2 );
nrf_gpio_pin_clear( pin_2 );

pwm_active = false;	// pwm now disabled

}

By all accounts this should properly disable the PWM and underlying GPIOTE modules. This worked fine on SDK10, but SDK12 has this issue. I've verified after a stop the the pins are indeeds Low, and I've also verified that the HFCLK is not running. Therefore this issue must lie in the PPI or GPIOTE tasking.

Parents
  • Hi Dave

    Tried this on my nRF51-DK and board and nRF5 SDK 12.1.0 and have the same result, current consumption is ~300uA after disabling app_pwm with either calling app_pwm_disable or app_pwm_uninit. You pointed out that this worked properly in SDK 10.0.0 so I compared the code in app_pwm_disable function and the only difference is that the pan73 workaround has been removed from SDK 12. So I added the following code to line 952 in app_pwm.c

    pan73_workaround(p_instance->p_timer->p_reg, false);
    

    then the current consumption is normal. I am not sure at this point why the workaround was removed in SDK 12. I have reported the issue and will hopefully have an answer to that question soon.

Reply
  • Hi Dave

    Tried this on my nRF51-DK and board and nRF5 SDK 12.1.0 and have the same result, current consumption is ~300uA after disabling app_pwm with either calling app_pwm_disable or app_pwm_uninit. You pointed out that this worked properly in SDK 10.0.0 so I compared the code in app_pwm_disable function and the only difference is that the pan73 workaround has been removed from SDK 12. So I added the following code to line 952 in app_pwm.c

    pan73_workaround(p_instance->p_timer->p_reg, false);
    

    then the current consumption is normal. I am not sure at this point why the workaround was removed in SDK 12. I have reported the issue and will hopefully have an answer to that question soon.

Children
Related