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

nRF52840 zephyr light control example / Can't find PWM_0

Hi,

I was following the example posted on the below link.

https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial---part-2-ncs-v1-4-0

It is called, light controller.

My board is nRF82540DK.

When it runs, the serial monitor spits out this, Can't find PWM_0".

In the prj.conf file, CONFIG_PWM=y is stated.

I also enabled the PWM (Pulse Width Modulation) Drivers by the "ninja menuconfig".

What else am I missing?

Thanks,

masakura

Parents Reply
  • Hi,
    This thing is very strange. Right after I issued this ticket, I was looking to various files to figure out the issue. Then I came across this to resolve the issue, which was to replace the first two lines with the following two lines below.

    //#define PWM_DEVICE_NAME DT_PROP(DT_NODELABEL(pwm0), label)
    //#define PWM_CH0_PIN DT_PROP(DT_NODELABEL(pwm0), ch0_pin)

    #define PWM_DEVICE_NAME DT_PROP(DT_N_NODELABEL_pwm0, label)
    #define PWM_CH0_PIN DT_PROP(DT_N_NODELABEL_pwm0, ch0_pin)

    But when I ran the very original code (with the first two lines above and commented out the last two lines) today, it is working. I have no idea why. Anyway, thanks for your help and hoping that this thing never happen.

    Thanks,
    Masakura 

Children
Related