Skip to content

Improve analogWrite #153

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

Merged
merged 12 commits into from
Apr 13, 2020
Merged

Improve analogWrite #153

merged 12 commits into from
Apr 13, 2020

Conversation

oclyke
Copy link
Contributor

@oclyke oclyke commented Apr 13, 2020

ap3-pwm_output and consequently analogWrite now properly clear and reset the ctimer peripherals when changing the desired configuration. The functions may be called as often as desired without affecting the PWM duty cycle thanks to a simplified rollover check.

oclyke added 12 commits April 8, 2020 11:27
I think these were pre-development for the Apollo3 Plus
this includes several commented-out sections for modules that do not have corresponding definitions for the Apollo3. Reached out to Arpit at Ambiq Micro to address this
The full duplex direction enumeration was removed in SDK 2.4.2. Need to find out if this functionality is still supported or not.
The support is good enough to not warrant such strongly worded advice
this ensures that (when the timer is running) at least one pulse is emitted at each desired setting

this removes concerns about calling analogWrite too often and changing the duty cycle

the tradeoff is that analogWrite is now a blocking function that could take up to one whole timer period
@oclyke oclyke mentioned this pull request Apr 13, 2020
@oclyke
Copy link
Contributor Author

oclyke commented Apr 13, 2020

Fixes #146

@oclyke oclyke merged commit 72b62bb into master Apr 13, 2020
@oclyke oclyke deleted the no-inversion branch April 13, 2020 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant