This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC1352P7: PWM in Zephyr with GP Timers seems to be irregular

Part Number: CC1352P7


Tool/software:

I am trying to use PWM on my Beagleconnect Freedom running Zephyr. To test this, I am trying to fade LED similar to the Fade arduino sample. I have created a reproducible Zephyr sample application here

I am using the following device tree overlay to enable PWM as stated in ti,cc13xx-cc26xx-timer-pwm:

```

/ {
  aliases {
    pwm-led0 = &pwm_led0;
  };

  pwmleds {
    compatible = "pwm-leds";
    pwm_led0: pwm_led_0 {
      pwms = <&pwm0 0 255 PWM_POLARITY_NORMAL>;
      label = "PWM MB1";
    };
  };
};

&pinctrl {
  pwm0_default: pwm0_default {
    pinmux = <17 IOC_PORT_MCU_PORT_EVENT1>;
    bias-disable;
    drive-strength = <2>;
  };
};

&gpt0 {
  status = "okay";
};

&pwm0 {
  status = "okay";
  pinctrl-0 = <&pwm0_default>;
  pinctrl-names = "default";
};

```

What I observe is erratic blinking rather than smooth fade. It seems like the timing of the pulses is wrong or something. However, I do not have an oscilloscope to really test the output.