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.
Hello,
I am trying to run a motor control application on an F28335 board, using the the eQEP for rotation sensing.
At the beginning I was working with a dedicated incremental sensor on the motor. It worked fine. Now I switched to a different hardware, based on a pair of hall sensors. And the rotation sensing is not working any more.
I am suspecting that it is due to the fact that there is no index signal, in this new setup. Hence my question: is the eQEP module able to work without index signal ?
Many thanks in advance.
Yes, you should be able to configure the eQEP module to reset the position count when the maximum count is reached instead of when the index signal is seen. This is how all of the MotorWare example projects use an incremental encoder.
You should also be careful because most hall-based position sensing solutions do not have enough resolution in order to accurately detect the rotor angle of a motor.
OK.
Then the problem must be elsewhere. It should not be the resolution, since this Hall-based solution is working with another rapid prototyping board (dSPACE MicroAutobox).
I will come back to you if I have other ideas on the root cause. But the initial question is answered.
Hello,
Yes I had it work. It was a problem with the configuration of the eQEP. I don't remember the details, but I can give the code (generated from Simulink):
#include "DSP2833x_Device.h" #include "DSP2833x_Examples.h" #include "DSP2833x_GlobalPrototypes.h" #include "rtwtypes.h" #include "Main_application.h" #include "Main_application_private.h" void config_QEP_eQEP1(uint32_T pcmaximumvalue, uint32_T pcInitialvalue, uint32_T unittimerperiod, uint32_T comparevalue, uint16_T watchdogtimer, uint16_T qdecctl, uint16_T qepctl, uint16_T qposctl, uint16_T qcapctl, uint16_T qeint) { EALLOW; /* Enable EALLOW*/ /* Enable internal pull-up for the selected pins */ GpioCtrlRegs.GPAPUD.bit.GPIO20 = 0; /* Enable pull-up on GPIO20 (EQEP1A)*/ GpioCtrlRegs.GPAPUD.bit.GPIO21 = 0; /* Enable pull-up on GPIO21 (EQEP1B)*/ GpioCtrlRegs.GPAPUD.bit.GPIO22 = 0; /* Enable pull-up on GPIO22 (EQEP1S)*/ GpioCtrlRegs.GPAPUD.bit.GPIO23 = 0; /* Enable pull-up on GPIO23 (EQEP1I)*/ /* Configure eQEP-1 pins using GPIO regs*/ GpioCtrlRegs.GPAMUX2.bit.GPIO20 = 1; /* Configure GPIO20 as EQEP1A*/ GpioCtrlRegs.GPAMUX2.bit.GPIO21 = 1; /* Configure GPIO21 as EQEP1B */ GpioCtrlRegs.GPAMUX2.bit.GPIO22 = 1; /* Configure GPIO22 as EQEP1S*/ GpioCtrlRegs.GPAMUX2.bit.GPIO23 = 1; /* Configure GPIO23 as EQEP1I*/ EDIS; EQep1Regs.QPOSINIT= pcInitialvalue; /*eQEP Initialization Position Count*/ EQep1Regs.QPOSMAX= pcmaximumvalue; /*eQEP Maximum Position Count*/ EQep1Regs.QUPRD= unittimerperiod; /*eQEP Unit Period Register*/ EQep1Regs.QWDPRD= watchdogtimer; /*eQEP watchdog timer Register*/ EQep1Regs.QDECCTL.all = qdecctl; /*eQEP Decoder Control (QDECCTL) Register*/ EQep1Regs.QEPCTL.all = qepctl; /*eQEP Control (QEPCTL) Register*/ EQep1Regs.QPOSCTL.all = qposctl; /*eQEP Position-compare Control (QPOSCTL) Register*/ EQep1Regs.QCAPCTL.all = qcapctl; /*eQEP Capture Control (QCAPCTL) Register*/ EQep1Regs.QEPCTL.bit.FREE_SOFT= 2; /*unaffected by emulation suspend*/ EQep1Regs.QPOSCMP = comparevalue; /*eQEP Position-compare*/ EQep1Regs.QEINT.all = qeint; /*eQEPx interrupt enable register*/ }
Hope it helps.
Best regards