How to reassign LED pin values in NRF Connect SDK

I'm having trouble reassigning the pin value for the LED's in the connect SDK. I am using the base PWM Blinky example and have changed the pin value assigned to PWM_LED0 in the dts file but it does not reflect this during the debugging and still blinks LED 1 on the DK board. What is the proper way to change the pin assigned to PWM_LED0?

Parents
  • Hi Joe,

    Good to know that you have found a solution. There can be other solutions as well like enabling PWM1 and connecting to LED1. However, the solution of changing PWM0 pin to LED1 through overlay is also suitable for your problem. On nRF52840, LEDS are connected to 13-16 pins on port-0. 

    &pwm0_default {
        phandle = < 0xd >;
        group1 {
            psels = < NRF_PSEL(PWM_OUT0, 0, 0xe) >;
            nordic,invert;
        };
    };

    Using NRF52840, the led#2 of the board (actually led1) will be connected to the PWM through this overlay.

    Thanks,

    Naeem

Reply
  • Hi Joe,

    Good to know that you have found a solution. There can be other solutions as well like enabling PWM1 and connecting to LED1. However, the solution of changing PWM0 pin to LED1 through overlay is also suitable for your problem. On nRF52840, LEDS are connected to 13-16 pins on port-0. 

    &pwm0_default {
        phandle = < 0xd >;
        group1 {
            psels = < NRF_PSEL(PWM_OUT0, 0, 0xe) >;
            nordic,invert;
        };
    };

    Using NRF52840, the led#2 of the board (actually led1) will be connected to the PWM through this overlay.

    Thanks,

    Naeem

Children
No Data
Related