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