Hello Sir/Madam,
I am trying to write on " EQep1Regs.QCLR.bit.IEL", but unable to write.
With below lines
if (lsw==0) {
EQep1Regs.QPOSCNT=0; // Reset position cnt.
EQep1Regs.QCLR.bit.IEL = 1;
}
It makes the POSCNT = 0, when lsw = 0, but doesn't write on EQepRegs. I am not able to understand what i am missing to initialize.
The motor works perfectly fine when lsw = 1 or 2.
I am using PWM interrupt 1, 2, 3 for generation of PWM signals and PWM4 for interrupt for control logic. There are no other interrupts in my code. I have modified "HVPM_Sensored.c" according to my requirement (in terms of generation of PWM signals, rest is same as the original).
Thanking you in advance.