nRF54L15 with SW PWM

Hello Nordic team,

I'm developing firmware for a custom board based on the nRF54L15, where the LEDs are connected to GPIOs on port 2. These pins do not support hardware PWM, so I want to use the nordic,nrf-sw-pwm driver to enable PWM functionality in software.

I based my setup on the nRF54L15DK and PWM LED sample and added the following overlay:

/ {
    sw_pwm: pwm_sw {
        status = "okay";
        compatible = "nordic,nrf-sw-pwm";
        channel-gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>;
        clock-prescaler = <0>;
        generator = <&timer00>;
        #pwm-cells = <3>;
    };

    pwm_leds {
        compatible = "pwm-leds";
        status = "okay";

        red_pwm_led: led_0 {
            pwms = <&sw_pwm 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
            label = "Red PWM LED";
        };
    };
};

&timer00 {
    status = "okay";
};

My prj.conf

CONFIG_LOG=y
CONFIG_LOG_MODE_IMMEDIATE=y

CONFIG_PWM=y
CONFIG_PWM_NRF_SW=y
CONFIG_LED=y


However, the build fails with the following error:

nrfx_gpiote.h:75:33: error: 'NRF_GPIOTEDT_N_S_soc_S_peripheral_50000000_S_gpio_50400_P_gpiote_instance_IDX_0_PH_P_instance' undeclared here (not in a function)

It seems that the macro NRF_GPIOTEDT_* is not properly generated.

Questions:

  1. Is nordic,nrf-sw-pwm supported on the nRF54L15?

  2. What is the correct way to enable and use the nrf-sw-pwm driver with GPIO port 2 on this platform?

  3. Are there any limitations or required configurations for using GPIOTE or TIMER with nrf-sw-pwm on nRF54L15?

  4. Could you recommend the proper way to integrate and configure this driver in the project?

SDK version 2.9.0
I also tried using SDK version 3.0.0. It also has this error, but besides it there is also an error related to RTC

Thank you in advance!

Best regards,
Oleksandr

Parents Reply Children
No Data
Related