Library that allows for higher resolution and speed than standard mbed PWM library using same syntax (drop-in replacement).
Dependents:
PwmOscillator
FastStepDriver
TLC5940
CameraTest
... more
2 comments:
I see my documentation can use some refinement, since it says ticks sets the period in clock ticks. (Which was the case in the very first version of FastPWM, since it only included the LPC1768). It is supposed to keep the current prescaler, if you want to set it to set the prescaler to a certain value you can use the setPrescaler function for that, but period_ticks is mainly intended to be very fast with low overhead, and do nothing besides setting the ticks.
Am I correct that addresses your problem, or am I missing another issue? Otherwise I just clarify the documentation better.
Yes, that clarify:
"FastPWM mypwm(mypin,1)" or "mypwm.prescaler(1)" set the values correct when using function period_tick;
"Otherwise I just clarify the documentation better": A remark that prescale has to be set (= 1) before calling function period_tick when programmer want to run pwm in clock ticks.
Now it works so fast that my 40Mhz Oscilloscope are struggling to keep up.......
Thumps up :)
I see my documentation can use some refinement, since it says ticks sets the period in clock ticks. (Which was the case in the very first version of FastPWM, since it only included the LPC1768). It is supposed to keep the current prescaler, if you want to set it to set the prescaler to a certain value you can use the setPrescaler function for that, but period_ticks is mainly intended to be very fast with low overhead, and do nothing besides setting the ticks.
Am I correct that addresses your problem, or am I missing another issue? Otherwise I just clarify the documentation better.