Skip to content
Snippets Groups Projects
Commit 4386d5cc authored by Emilio Corigliano's avatar Emilio Corigliano
Browse files

[CountedPWM] Non resetting the pulse counter so that we won't be stuck if we...

[CountedPWM] Non resetting the pulse counter so that we won't be stuck if we call generatePulses too frequently
parent 297ae353
Branches
No related tags found
No related merge requests found
......@@ -85,8 +85,8 @@ void CountedPWM::setDutyCycleResolution(unsigned int dutyCycleResolution)
void CountedPWM::generatePulses(uint16_t pulses)
{
// Reset the counters
pulseTimer.setCounter(0);
// Reset only the counter timer so that the pulses are generated always with
// the correct frequency and duty cycle
counterTimer.setCounter(0);
// Set the capture and compare register to the number of pulses to generate
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment