I spent the past couple of hours marking up code and getting an assessment of what I need to do. Have a couple of questions on various topics.
1. Whats the max duration of IntervalTimer? Does it pick the appropriate timer according to the delay?
2. For prioritizing timers, is it possible to give priorities that are not multiples of 16? Will a 17 interrupt an 18? Or do they map to a lower priority? (32)?
3. What's the advantage of using IntervalTimer vs TeensyTimerTool?
I have 3 timers in my system.
1. A periodic 20 ms timer for RPM calculation
2. A one shot timer to generate a 4us stepper pulse. Currently turned off in SW. Could just have the one shot signal routed to a pin...
3. A display blanking timer that blanks 2 revolutions of the spindle (during sync time) 1 rev = 300ms @ 200 RPM. Min speed is 100 RPM --> 1 rev = 600 ms.
Can I do all of these using IntervalTimer?
How does one handle the 32 bit rollover for QuadEncoder? Does the difference register work correctly? Say the spindle is going in reverse and each count is decrementing. At roll over what happens to the difference? What happens to the count? Count is max value? Is the difference still -1? This confuses me.
1. Whats the max duration of IntervalTimer? Does it pick the appropriate timer according to the delay?
2. For prioritizing timers, is it possible to give priorities that are not multiples of 16? Will a 17 interrupt an 18? Or do they map to a lower priority? (32)?
3. What's the advantage of using IntervalTimer vs TeensyTimerTool?
I have 3 timers in my system.
1. A periodic 20 ms timer for RPM calculation
2. A one shot timer to generate a 4us stepper pulse. Currently turned off in SW. Could just have the one shot signal routed to a pin...
3. A display blanking timer that blanks 2 revolutions of the spindle (during sync time) 1 rev = 300ms @ 200 RPM. Min speed is 100 RPM --> 1 rev = 600 ms.
Can I do all of these using IntervalTimer?
How does one handle the 32 bit rollover for QuadEncoder? Does the difference register work correctly? Say the spindle is going in reverse and each count is decrementing. At roll over what happens to the difference? What happens to the count? Count is max value? Is the difference still -1? This confuses me.