arduino / arduino/ArduinoCore-mbed

Nano RP2040 Servo pulsewidth imprecision

Open
#1,019 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
411
Forks
225
PR merge metrics
No merged PRs in 30d

Description

Observed downward fluctuations of more than ~30 us when writing a 1500 us pulse to 7 different pins.
Caused a lot of random spinning as I was using the signal for ESCs.

Used the Servo.h library as provided by this core.
```
const byte motor_pins[7] {2, 3, 5, 6, 9, 10, 11};
Servo motors[7];

void setup() {
for (int i = 0; i < NUM_MOTORS; i++) {
motors[i].attach(motor_pins[i]);
motors[i].writeMicroseconds(1500);
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the provided Servo.h sketch on the Nano RP2040 with seven pins and measure the 1500 us outputs. Start by tracing the Servo.h implementation used by this core and its pulse-timing path. Done means the commanded pulsewidth no longer shows downward fluctuations of more than about 30 us across the attached pins.

Written by the indexing model from the issue text.

Assessment

Tech stack
arduino, c
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.