Skip to content

Strange PWM behavior on wake? #926

Discussion options

You must be logged in to vote

That's happening because the duty cycle is gettting set after the compare match for the new setting would have occurred, this produces a glitch lasting the duration of one pwm cycle.

This is a problem with the split mode of the TCA, since it doesn't support buffering, which is the mechanism used to ensure that changing the duty cycle can never cause a glitch. This was one of the reasons that I implemented the (as yet untested) PWM pin selection tools subvmenu (another was that the tinies were jealous of DxCore's runtime portmux switching...), which lets you choose between a number of relevant pin mappings, for both the TCA and (on 1-series) the TCD. These pin mappins include 3-pin options…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by unhinged-engineer
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants