mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-04 12:11:56 +00:00
Though there were issues with this sample before e959386bd2
("samples:
servo_motor: cleanups and changes"), that commit introduced further
bugs. This happened because the new pwm-servo alias that commit
switched to wasn't provided by any boards, so it wasn't built in CI.
Before that, however, the recommendation to use bbc_microbit in the
sample documentation was also buggy in a couple of ways:
1. bbc_microbit doesn't have the pwm-0 alias the sample
previously required, so it didn't build on that board
2. the documentation's comment to use pin 0 on the edge connector
is wrong; PWM channel 0 is wired to GPIO P0.0 on the SoC,
which is actually pin 21 on the connector
Fix it all up.
Tested on bbc_microbit. I verified the pinout and also made sure that
the sample correctly generates pulses from 700 to 2300 usec.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
11 lines
125 B
Plaintext
11 lines
125 B
Plaintext
/* SPDX-License-Identifier: Apache-2.0 */
|
|
/ {
|
|
aliases {
|
|
pwm-servo = &sw_pwm;
|
|
};
|
|
};
|
|
|
|
&sw_pwm {
|
|
clock-prescaler = <3>;
|
|
};
|