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

what is the maximum limit for PWM outputs pins on nrf52832? Can we use all the GPIO pins as a PWM output?

Hello

what is the maximum limit for PWM outputs pins on nrf52832? Can we use all the GPIO pins as a PWM output?

For ADC, i can see there are 8 dedicated pins , but i want to confirm for PWM that if there are any GPIO pins which can't be used as PWM o/p.

Thanks for your time

Parents
  • Hi,

    Yes, any available GPIO pin can be used as PWM. The nRF52832 has 12 hardware PWM channels with DMA, and also allows 8 GPIOTE based PWM channels. So you have 20 PWM channels in total.

Reply
  • Hi,

    Yes, any available GPIO pin can be used as PWM. The nRF52832 has 12 hardware PWM channels with DMA, and also allows 8 GPIOTE based PWM channels. So you have 20 PWM channels in total.

Children
  • Hi, There are specific GPIO pins for hardware and software PWM channels ? What are the pin numbers for hardware PWM channels please ? (nRF52832 QFN48)

  • Hi omar,

    You can use any free GPIO you want. Note that if you are using the nRF52832-DK, some of the pins are used for e.g. LEDs and buttons. See this drawing. If you are looking for a simple hardware PWM example, take a look at this post.

  • Thank you Sigurd for your help !

  • But in section  "4.3 GPIO usage restrictions" in "nRF52832 Product Specification v1.4",  it  recommend pin27, pin 28 .. pin43 of QFN48 package only used to Low drive, low frequency I/O, so it seems that some pins are not suitable for pwm, is it right?

  • For maximum radio performance, we recommend not using PWM signals that are higher than 10 kHz on those pins. This is a guideline to maximize radio performance in an application.