Tool/software: Code Composer Studio
Hi TI experts,
I'm using TMS320F28377S to do the closed loop pmsm control.
The qep interface is only a '74LVC245A' for transforming 5V to 3V3 with no isolation.
When I rotate the motor by hand, what confused me is that I can only get about 90% counts each mechanical cycle by checking QPOSCNT.
What's more, I got a little bit more counts in clockwise than that in anti-clockwise.
I tried two encoders and the results are similar. The waveform of dsp input pins qepa and qepb seem no problem.
Please give me some advises.
Here is the init code:
EQep3Regs.QUPRD=2000000;
EQep3Regs.QDECCTL.bit.QSRC=0;
EQep3Regs.QEPCTL.bit.FREE_SOFT=2;
EQep3Regs.QEPCTL.bit.PCRM=0;
EQep3Regs.QEPCTL.bit.UTE=1;
EQep3Regs.QEPCTL.bit.QCLM=1;
EQep3Regs.QPOSMAX=0xffffffff;
EQep3Regs.QEPCTL.bit.QPEN=1;
EQep3Regs.QCAPCTL.bit.UPPS=5;
EQep3Regs.QCAPCTL.bit.CCPS=6;
EQep3Regs.QCAPCTL.bit.CEN=1;
Thank you.