Skip to content

Idle pin state in PWM #2447

Closed Answered by DonatelloX
DonatelloX asked this question in Q&A
Jul 17, 2024 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

Thank you.
I use:
timerTreatment->setCount(timerTreatment->getOverflow()-1);
after:
timerTreatment->pause();
and I think it works now.

I have changed your pause() routine in HardwareTimer.cpp:

void HardwareTimer::pause(bool setLow = false)
{
 // [...]

  if (setLow) {
    uint32_t maxCount = getOverflow();
    setCount(maxCount - 1);
  }

}

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@fpistm
Comment options

@DonatelloX
Comment options

@fpistm
Comment options

Answer selected by fpistm
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
Converted from issue

This discussion was converted from issue #2446 on July 17, 2024 12:57.