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.

TMS320F28335: eQEP Interrupt setup based on CpuTimer0

Part Number: TMS320F28335
Other Parts Discussed in Thread: CONTROLSUITE

Hi everyone,

I'm trying to perform a IPM control use 28335,I used CpuTimer0 to generate interrupt every 0.1ms to control the motor by vector control. But also I need to read Index and calculate speed and position of the motor from the encoder using the eQEP functions. Could anyone help me about setting up the eQEP based this interrupt:

InitCpuTimers(); // Start the timer modules

ConfigCpuTimer(&CpuTimer0,150,100); // Configure CPU - Timer0 at 100 microseconds

PieCtrlRegs.PIEIER1.bit.INTx7 = 1; // Enable Timer0 INT in the PIE: Group 1 interrupt register (bit 7)

IER |=5; // enable INT1 for timer

EINT; // enable interruptions
ERTM; // enable real time mode

CpuTimer0Regs.TCR.bit.TSS = 0; // Start timer0

 

Thanks

Yang Sun

  • Yang,

    The eQEP is meant to be used as a free-running track of the motor position. Please refer to the examples in controlSUITE and read through the eQEP User Guide (SPRUG05) for how to use the eQEP.
    The eQEP Speed and Position measurement example located at "..\ti\controlSUITE\device_support\f2833x\v142\DSP2823x_examples_ccsv5\eqep_pos_speed" provides a great framework for getting started with using the eQEP. An EPWM is used to simulate the EQEP signals from a rotary encoder.