WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
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.