Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Servo HAL: Do not disable timer if some of its channels are still in use #839

Merged
merged 1 commit into from Mar 14, 2016

Conversation

@sergeuz
Copy link
Member

commented Jan 25, 2016

This PR fixes #745 by tracking what timer channels are used to control attached servos.

Note that hardware timers are shared between different HAL submodules, namely, servo, tone and PWM HALs, and any of these still can override timer settings configured by another submodule. Ideally, we need to report an error when user application attempts to reuse already active timer with different settings.

@sergeuz sergeuz force-pushed the sergeuz:issue/pwmtimer branch from 0e62306 to dd66e14 Jan 27, 2016

@sergeuz

This comment has been minimized.

Copy link
Member Author

commented Jan 28, 2016

I've updated this PR to make timer state data stored separately from pins table. The code compiles well for the Core platform, but I'm unable to test it there (wiring test is included).

@m-mcgowan m-mcgowan added this to the 0.4.10 milestone Feb 1, 2016

@sergeuz sergeuz force-pushed the sergeuz:issue/pwmtimer branch 2 times, most recently from f970923 to 1737c7a Feb 5, 2016

@sergeuz

This comment has been minimized.

Copy link
Member Author

commented Feb 5, 2016

Simplified this patch by removing previously introduced additional storage for pin state data.

@sergeuz sergeuz self-assigned this Feb 5, 2016

@m-mcgowan

This comment has been minimized.

Copy link
Contributor

commented Feb 5, 2016

Even better! 👍 I'll run the wiring/no_fixture test on the Core before merging.

@m-mcgowan

This comment has been minimized.

Copy link
Contributor

commented Mar 14, 2016

Ran wiring/no_fixture tests on the Core - they passed. (There was a unrelated WiFi failure, and I had to remove EEPROM tests to make it fit, in the process discovered that arm gcc 5.2.1 breaks USB serial on the Core - probably an incorrect optimization, or buggy code.)

m-mcgowan added a commit that referenced this pull request Mar 14, 2016
Merge pull request #839 from sergeuz/issue/pwmtimer
Servo HAL: Do not disable timer if some of its channels are still in use

@m-mcgowan m-mcgowan merged commit c74f8f5 into particle-iot:develop Mar 14, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.