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

Is it possible to make 5 PWM outputs on NRF51422 (or NRF51822)?

I know that it is possible to make 4 PWM outputs, but I need to generate 5. I will be using SoftDevice 110 and BLE. Is there any possible way to generate a 5th PWM output?

Any advice would be much appreciated.

Parents
  • Hi,

    We have 4 compare events per timer instance, for each of these 4 one will be used as a reset. That means that we're left with three possible outputs per timer. In operation alongside the SoftDevice we will have access to two timers, this gives us a total of 6 outputs.

    The problem is that we only have 4 GPIOTE slots, which means that you will not get reliable PWM output, this might be fine if you want to control a LED or simple motor.

    For help on implementation search google for "bit bang pwm", and there should be some useful results.

    Best regards,

    Øyvind

Reply
  • Hi,

    We have 4 compare events per timer instance, for each of these 4 one will be used as a reset. That means that we're left with three possible outputs per timer. In operation alongside the SoftDevice we will have access to two timers, this gives us a total of 6 outputs.

    The problem is that we only have 4 GPIOTE slots, which means that you will not get reliable PWM output, this might be fine if you want to control a LED or simple motor.

    For help on implementation search google for "bit bang pwm", and there should be some useful results.

    Best regards,

    Øyvind

Children
Related