[PSR] IRC_SR register values in interrupts
beranj25 at fel.cvut.cz
beranj25 at fel.cvut.cz
Fri Jan 12 12:55:14 CET 2018
In IRC interrupt routine I sometimes get values of IRC_A_MON and
IRC_B_MON which are the same as in the interrupt that follows. So the
status changes of IRC_{A,B}_MON are like this:
[...] 0 2 2 3 3 1 1 0 2 2 3 3 1 1 0 0 2 2 3 3 1 1 0 0 2 3 1 1 0 0 2 2 [...]
However, absolute position computed from such status changes seems to
be correct. Spin in one direction for a given time then spin in the
opposite direction at the same speed for the same time returns to
roughly initial value. The difference from initial value is only about
tens (one step in absolute position corresponds to one interrupt).
Besides, in some cases (tens of hundred thousands interrupts) I read
zero from IRC_IRQ_MON, but interrupt source is setup to rising edge,
so I'd expect '1' every time.
Have anyone encountered similar issue or do you have any explanation
for this behavior?
Thanks
Jaroslav Beran
More information about the PSR
mailing list