Re: nrf52 hw pwm 1 enabled and compile failed on sample code #builds #ninja


Hi Jeremy

The reason is that hardware is static and defined as part of the device tree, so for the nRF52840 this will be in the boards\arm\nrf52840_pca10056 directory and is nrf52840_pca10056.dts, if you open this file in a text editor and search for PWM you will find this code:

&pwm0 {

                status = "ok";

                ch0-pin = <13>;



There is no pwm1 section, so to utilise a second PWM channel you would need to create another section for it named &pwm1.


Join { to automatically receive all group messages.