Part Number: TMS320F28375D
Tool/software: Code Composer Studio
The pulse count and QCTMRLUT are checked for each interrupt.
The settings are as follows:
================================================== ====
GpioCtrlRegs.GPAQSEL2.bit.GPIO20 = 2; // Synchronize GPIO20 to SYSCLK 6sample (EQEP1A)
GpioCtrlRegs.GPAQSEL2.bit.GPIO21 = 2; // Synchronize GPIO21 to SYSCLK 6sample (EQEP1B)
GpioCtrlRegs.GPAQSEL2.bit.GPIO23 = 2; // Synchronize GPIO23 with 6 samples of SYSCLK (EQEP1I)
EQep1Regs.QDECCTL.bit.QSRC = 00; // Quadrature count mode
EQep1Regs.QEPCTL.bit.FREE_SOFT = 2;
EQep1Regs.QEPCTL.bit.PCRM = 01;
EQep1Regs.QEPCTL.bit.UTE = 0; // not UTE
EQep1Regs.QEPCTL.bit.QCLM = 0; // read QPOSCNT = TMRLAT
EQep1Regs.QCAPCTL.bit.UPPS = 0xF; // Prevent generation of UPEVNT
EQep1Regs.QPOSMAX = 0x0000FFFF; // Maximum position = 0xFFFF
EQep1Regs.QCAPCTL.bit.CCPS = 3;
EQep1Regs.QCAPCTL.bit.CEN = 1; // Enable QEP capture
EQep1Regs.QEPCTL.bit.QPEN = 1; // QEP enabled
================================================== ====
After confirming the operation with this setting,
The value of QPOSCNT will increment correctly, but the value of QCTMRLUT may be skipped.
Increasing the number of pulses increases the likelihood of occurrence.
Please tell me how to read the value of QCTMRLUT correctly.
