Tool/software: Code Composer Studio
Hello Esteemed Helpers,
I have tried to reduce my problem to the minimal functionality which still exhibits the problem. There is a 2000 point quadrature rotary encoder triggering an ISR with QEI_INTDIR. The minimalist code is below:
void QEIInterruptHandler(void)
// =========================
{
// QEIIntClear(QEI0_BASE,QEI_INTDIR);
if (stepLogic == 0)
{
PULSE_LOW;
stepLogic = 1;
}
else
{
PULSE_HIGH;
stepLogic = 0;
}
}
When the encoder is stationary, the ISR is triggered at a very fast rate once an interrupt is sent (by twitching the encoder spindle) as shown in the scope cap. But iI f the comment on the Clear event is removed nothing happens even when the encoder is set in motion at 5 RPM (Or to be more accurate the pulse goes high and stays there). I must be missing something about clearing interrupt events. Thank you.