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

3 time aligned PWM channels

I need 3 time aligned PWM channels (period of all three channels needs to start at the same time) at about 100 Hz with 16 bit resolution on the duty cycle. I also need to trigger some code to run when all three channels are in there off cycle.

What is the best way to do this?

I tried the low power PWM lib, but it seems due to the RTC1 timer frequency, this can only support 8 bit resolution at 100 Hz.

I think I need something like the PWM library, but with 3 channels on one timer. What's the reason this is currently limited to 2 channels? Could it be extended to 3 channels?

What about the PWM hardware driver? Does this have the same limitation?

Parents
  • Hi

    I think if you want 16 bit resolution within the same duty cycle for 100Hz pwm then the pwm hardware + driver is the only option which allows for 16MHz pwm frequency. The pwm hardware is only present on nRF52. The pwm library frequency is limited to 200kHz and the duty cycle update frequency is limited to maxiumum 100kHz. An overview is on this thread.

Reply
  • Hi

    I think if you want 16 bit resolution within the same duty cycle for 100Hz pwm then the pwm hardware + driver is the only option which allows for 16MHz pwm frequency. The pwm hardware is only present on nRF52. The pwm library frequency is limited to 200kHz and the duty cycle update frequency is limited to maxiumum 100kHz. An overview is on this thread.

Children
No Data