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

nrf52832 SDK13 PWM cant change duty cycle at first period

hello ,everyone

I was confused by a PWM problem for a long time , on nrf52832 SDK13 ,i wanna change the PWM duty cycle every period ,but now i find can not change it at first period but is correct operate at subsequent period

the waveform shows that the second period is same with the first period , the third one and consecutive is invert channel 0 and channel 1 correctly

appendix the descriptive picture . image description

appendix the code of pwm handler image description

is a bug for the pwm driver ?

thanks for your attention

Parents
  • Hi,

    Could you explain this some more ?

    You have 3 PWM channels. Is the pwm signal correct on any of these channels ?

    i wanna change the PWM duty cycle every period

    What do you mean by this? You want to continuously change the duty cycle[%] to a different value after each period ? and for all channels ? Should this change be the same for all the channels ?

    How should the PWM signal look like?

Reply
  • Hi,

    Could you explain this some more ?

    You have 3 PWM channels. Is the pwm signal correct on any of these channels ?

    i wanna change the PWM duty cycle every period

    What do you mean by this? You want to continuously change the duty cycle[%] to a different value after each period ? and for all channels ? Should this change be the same for all the channels ?

    How should the PWM signal look like?

Children
Related