Closed gbip closed 5 years ago
So to answer myself, this is not the best way to use a QEI. The best way is to sample the QEI often and to treat the overflow and underflow through software.
For getting the timer interrupt you can activate the cr.uie
bit for your timer and register an interrupt through the interrupt!
macro (from the device crate)
Hi there ! I'd like to use the QEI mode the timers using some encoders which have 4096 ticks. The main problem is that the
count()
method of the QEI struct only returns a u16. And I don't see any way to get an interrupt when the timer overflow or underflow. How would you manage to do that ? Thanks a lot !