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.

eQEP中断配置

如要使用IEL中断,捕获Z pulse;

EQep1Regs.QEINT.bit.IEL=1;

EQep1Regs.QEPCTL.bit.PCRM=00;

使用该配置,可产生QEP中断;

但将EQep1Regs.QEPCTL.bit.PCRM=01;

后无法产生中断

为什么?

  • PCRM是设置Position counter什么时候复位的一个模式。

    楼主可以看看QFLG寄存器,看看PCRM=00时楼主程序中是哪个事件产生中断,PCRM=01时候又是哪个事件没发生导致没有中断。