Skip to content

Commit 993cb30

Browse files
ananglcarlescufi
authored andcommitted
samples: blinky_pwm: Use nRF SW PWM driver on nRF DKs
The default nRF hardware PWM driver is not very suitable for this sample as that driver does not allow setting a period longer than ~262 ms. Use the nRF SW PWM driver instead. This will also ensure that the driver is built by CI for nRF52, nRF53, and nRF91 Series. Signed-off-by: Andrzej Głąbek <[email protected]>
1 parent 839769e commit 993cb30

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
&pwm0 {
2+
status = "disabled";
3+
};
4+
5+
&sw_pwm {
6+
status = "okay";
7+
channel-gpios = <&gpio0 13 PWM_POLARITY_INVERTED>;
8+
};
9+
10+
&pwm_led0 {
11+
pwms = <&sw_pwm 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
12+
};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
&pwm0 {
2+
status = "disabled";
3+
};
4+
5+
&sw_pwm {
6+
status = "okay";
7+
channel-gpios = <&gpio0 28 PWM_POLARITY_INVERTED>;
8+
};
9+
10+
&pwm_led0 {
11+
pwms = <&sw_pwm 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
12+
};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
&pwm0 {
2+
status = "disabled";
3+
};
4+
5+
&sw_pwm {
6+
status = "okay";
7+
channel-gpios = <&gpio0 2 PWM_POLARITY_INVERTED>;
8+
};
9+
10+
&pwm_led0 {
11+
pwms = <&sw_pwm 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
12+
};

0 commit comments

Comments
 (0)