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

Using 12 hardware and 1 software channel for pwm on nrf52

Hello I am new to work on nrf52,

Please can someone help me regarding how to use hardware and software pwm together. I have a need of using 13 leds , so i need 13 pwm. As max h/w pwm is 12 so i plan to use 12 h/w pwm using pwm driver, and 1 s/w pwm using pwm library.

When i merge the code from the examples, i copied the code from pwm library to pwm driver and added respective files like  app_pwm.h    app_pwm.c    nrf_drv_ppi.c    nrf_drv_timer.c

to the driver, but it still gives an error that .-- #20: identifier "TIMER0_ENABLED" is undefined ----

Also when i try to do the converse, by adding code from pwm driver to pwm library, it gives error

cannot open source input file "nrf_drv_pwm.h": No such file or directory

Even though i added "nrf_drv_pwm.h" from the components folder of sdk 12.2 on nrf52.

Related