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.

TMS320F28377S: About eQEP routines are unable to get location values after migration

Part Number: TMS320F28377S

At present, I plan to use the eQEP routine to implement it on TI's 28377s development board, and connect it to the TTL encoder instead of simulating the AB phase of the ePWM input encoder in the routine. In addition, there is no need for Z-phase signal (zero position), only the position and speed of the motor need to be obtained through the AB phase of the encoder.
But now, I have connected the AB signal of the encoder to the corresponding GPIO port (76, 75) in the routine, and the program has not reported any errors. After burning it onto the board, QPOSCNT remains 0, and there is a signal change in the GPIO port corresponding to rotating the encoder, but the position value has not changed.

and The GPIO settings are as follows(InitEQep1Gpio(void)):

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
void InitEQep1Gpio(void)
{
EALLOW;
GpioCtrlRegs.GPCPUD.bit.GPIO76 = 1;
GpioCtrlRegs.GPCPUD.bit.GPIO75 = 1;
GpioCtrlRegs.GPCDIR.bit.GPIO76 = 0;
GpioCtrlRegs.GPCDIR.bit.GPIO75 = 0;
GpioCtrlRegs.GPCQSEL1.bit.GPIO76 = 0;
GpioCtrlRegs.GPCQSEL1.bit.GPIO75 = 0;
GpioCtrlRegs.GPCMUX1.bit.GPIO76 = 1;
GpioCtrlRegs.GPCMUX1.bit.GPIO75 = 1;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Eqep_pos_speed.c:
#include "F28x_Project.h"
#include "Example_posspeed.h"
POSSPEED qep_posspeed=POSSPEED_DEFAULTS;
//
// Main
//
void main(void)
{
//
// 1
// PLL
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX