ArduPilot / ArduPilot/ardupilot

ChibiOS: Default output frequency has no effect if the motors set a frequency

Open
#10,643 0 comments 0 reactions 1 assignee Claimed by @tridge View on GitHub
BUG ChibiOS
Dominant language
C++
Stars
15.9k
Forks
21.4k
Avg merge
3d 17h
Merged PRs (30d)
119

Description

### Bug report

**Issue details**

On ChibiOS QuadPlane (tested specifically on plane, other vehicles startup order may or may not prevent the problem) if you set a SERVO_SPEED to something other then 50Hz (IE 100Hz) and have your quad motors on the IO processor using PWM (say at 490 Hz) then all the IO output pins (except for the motors) will remain at 50Hz regardless of what you have requested. The IOMCU does get the default rate set correctly if you never call the set_freq command. You can experiment with this by simply changing Q_ENABLE between 0 and 1 on the attached param file
[rcoutput_rate.txt](https://github.com/ArduPilot/ardupilot/files/2907876/rcoutput_rate.txt)
Channels of interest with this file: 1 (expected to be 100Hz but isn't), 5 (490Hz), 9 (100Hz).

Other things of note: setting the aux channels to a higher frequency by default does work (channel 9 is used as a rudder above).

**Version**
e9fc158c8a234ea (although this goes back at least 3 weeks before that commit, probably much longer)

**Platform**
[ x ] All
[ ] AntennaTracker
[ ] Copter
[ x ] Plane
[ ] Rover
[ ] Submarine

**Hardware type**
Anything with an IOMCU, initial testing was all done on a Cube.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.