Hello All,
I am trying to enable a PWM output on a Seeed Studio Xiao BLE board using Zephyr.
I am aware that this is a Zephyr issue but hopefully I can get some help here:
I am running the PWM blinky Example and I am unable to get it to work:
So far I understand the following:
In the dts I think this is the relevant code:
pwmleds {
compatible = "pwm-leds";
pwm_led0: pwm_led_0 {
pwms = <&pwm0 2 PWM_MSEC(200) PWM_POLARITY_INVERTED>;
};
};
in the above: the pwm output is being set on in port 2 which is pin D0 on the xiao board, which will have the period of 200 ms and the polarity is inverted.
I am assuming the comparability line sets what class of interfaces can be run by the PWM led device, but this is not defined any where so how can I find what pwm-leds is?
Furthermore, how would I set the pwm device such that I can output the PWM on a pin in terms of teh configuration I need to do in the device tree?
Any resources that you can link would be awesome. I have found that the zephyr documentation is not obvious what is going on and I think the YouTube videos just gloss over the underlying operational mechanisms.
Thanks in advance.