Hi, I am having some problems with the position compare interrupt, the ISR is never serviced. I have set the value in QPOSCMP and I can see the correct value in QPOSCNT that matches it while debugging. Can you tell me what I’m doing wrong?
int main(void)
{
/* USER CODE BEGIN (3) */
_enable_interrupt_();
gioInit();
etpwmInit();
adcInit();
hetInit();
QEPInit();
/* Enable Position Counter */
eqepEnableCounter(eqepREG1);
/* Enable position compare */
eqepEnablePosnCompare(eqepREG1);
/* Enable Unit Timer. */
eqepEnableUnitTimer(eqepREG1);
/* Enable capture timer and capture period latch. */
eqepEnableCapture(eqepREG1);
/* Enable position compare INT */
eqepEnableInterrupt (eqepREG1, QEINT_Pcm);
while(1)
{
}
/* USER CODE END */
return 0;
}
/* USER CODE BEGIN (4) */
void eqepNotification(eqepBASE_t *eqep,uint16 flags)
{
test++;
}