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

High current problem for app_pwm SDK13.0

Hi,

I am working on nRF52832 with SDK13.0 + GCC Eclipse.

I have used 2 app_pwm instances for driving a 3 color led. Once I init the pwm and set the duty cycle, the current increase from 3uA (sleep state) to 6.5mA. This 6.5mA current is just for the MCU as I have a separate power supply for the LED, the MCU is sinking current from the LED. When I call app_pwm_disable and app_pwm_uninit, the current still keep at 6.5mA.

Further more, if I just init the pwm but not set the duty cycle, it would be just 1mA and able to go back to 3uA sleep when I disable the pwm.

I have searched for some post about the pwm which mention about the pan73_workaround fix but I already found that in app_pwm_disable.

I have 2 questions: Is 6.5mA normal for using app_pwm? How to remove that 6.5mA when I disable the pwm?

Regards, George

Parents
  • Hi Sigurd,

    Finally I figure out the root cause is come from the float. I change the float duty_as_frac to double duty_as_frac and all other constant from 1.0f to 1.0L and the problem solve.

    Also if I just use the float for few times may not hit the problem. It is quite tricky.

    However, my application may use the FPU quite a lot. May I know more details about that FPU issue? How do I avoid that problem hit again?

Reply
  • Hi Sigurd,

    Finally I figure out the root cause is come from the float. I change the float duty_as_frac to double duty_as_frac and all other constant from 1.0f to 1.0L and the problem solve.

    Also if I just use the float for few times may not hit the problem. It is quite tricky.

    However, my application may use the FPU quite a lot. May I know more details about that FPU issue? How do I avoid that problem hit again?

Children
No Data
Related