Hi,
I'm using 2803xEqep_pos_speed example to measure the AC motor speed with a 2000ppr Incremental Encoder,but the final rpm value I got would be zero when the rpm became higher ,the frequency equal zero would be higher as well .My QEP control register initializations are as follows:
EQep1Regs.QUPRD=600000; // Unit Timer for 100Hz at 60 MHz SYSCLKOUT
EQep1Regs.QDECCTL.bit.QSRC=00; // QEP quadrature count mode
EQep1Regs.QEPCTL.bit.FREE_SOFT=2;
EQep1Regs.QEPCTL.bit.PCRM=00; // PCRM=00 mode - QPOSCNT reset on index event
EQep1Regs.QEPCTL.bit.IEI=10;
EQep1Regs.QEPCTL.bit.IEL=01;
EQep1Regs.QEPCTL.bit.UTE=1; // Unit Timeout Enable
EQep1Regs.QEPCTL.bit.QCLM=1; // Latch on unit time out
EQep1Regs.QPOSMAX=0x00001f3f;
EQep1Regs.QEPCTL.bit.QPEN=1; // QEP enable
EQep1Regs.QCAPCTL.bit.UPPS=5; // 1/32 for unit position
EQep1Regs.QCAPCTL.bit.CCPS=6; // 1/64 for CAP clock
EQep1Regs.QCAPCTL.bit.CEN=0; // QEP Capture DISable
void main(void)
{
InitSysCtrl();
InitEQep1Gpio();
DINT;
InitPieCtrl();
IER = 0x0000;
IFR = 0x0000;
InitPieVectTable();
qep_posspeed.init(&qep_posspeed);
for(;;)
{
qep_posspeed.calc(&qep_posspeed);
}
}
and in Example_posspeed.h file changed the mech_scaler value=8388(because used 2000 ppr encoder) and pole_pairs=4;
THE VALUE WILL HAVE PERIOD APPEAR,MORE HIGHER SPEED I GET AND THEN EQUAL ZERO FREQUENCY MORE HIGHER!
720 RPM!!!!
300RPM!!
Any suggestions?
Thanks in advance. This has been very frustrating.

