Tool/software: TI C/C++ Compiler
Hello
I have a problem with the reset of the QEI position counter.
I have to reset the QEI Position after reaching a reference position.
I reset the QEI position by writing
QEIPositionSet(QEI0_BASE, 0);
Now if I turning my motor a reset of the position register will happen not on the maximum position of 4095. It happens by maximum pos (4095) minus the value before the reset to zero.
If the motor reach the reference position at 859. A reset to counter value 0 (read by QEIPositionGet(QEI0_BASE)) happens at position 3232.
position before reset: 2203 reset to zero at position 1892
It's reproducible and always like
pos before reset = 4095 - pos at reset
4095 - 1892 = 2203
4095 - 3232 = 863
4095 - 509 = 3586
There is NO index signal from the encoder!
Here are the logs of the position counter (read by QEIPositionGet(QEI0_BASE)) and slow turning motor.
1890 1891 1891 1891 1891 1891 1891 1892 1892 0 0 0 0 0 0 1 1 1
3231 3232 3232 3232 3232 3232 0 0 0 0 1 1 2 2 2 2 3 3
507 507 507 508 508 509 509 509 509 509 509 0 0 0 0 1 2 2 2 2 2
Any advice to solve that problem?
Kind regards
Rene