This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LS1227: how to setup eQEP the position match interrupt?

Part Number: TMS570LS1227

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++;

}