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

PWMOut was not claming channels on shared TCCs #1184

Merged
merged 2 commits into from
Sep 12, 2018

Conversation

dhalbert
Copy link
Collaborator

Fixes #1106.

@deshipu - you may want to test this. I did try a test case similar to yours. The code was allocating the same TCC channel to multiple pins. This means that you may run out of timers earlier previously, because we were allocating the same TCC and channel to multiple pins by accident.

@dhalbert
Copy link
Collaborator Author

Some builds didn't fit any more by a tiny amount, so I bumped the compiler up to the version I was already using anyway.

@dhalbert
Copy link
Collaborator Author

Didn't mean to do a PR from adafruit/circuitpython. I had to reclone and recloned from adafruit/ instead of dhalbert/

@sommersoft
Copy link
Collaborator

This is the direction I was leaning in my "investigation" as well. In that since an existing TCC set at the desired frequency was looked for and used, any subsequent changes to it applied to all latched pins. I had stopped short of digging into the channel aspects before doing some domestics. Nice work @dhalbert!

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! I think the compiler is good since we haven't had an issue with 4.x dev.

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.

3 participants