Part Number: TMS320F28379D
Tool/software: CCS
Hello,
I am implementing speed calculation and its related protections for my motor control project. The initialisation for my EQEP is as follows:
EQep1Regs.QDECCTL.bit.QSRC = 0; // Position-Counter Source Selection - Quadrature Count Mode
EQep1Regs.QEPCTL.bit.FREE_SOFT = 0; // Position Counter and Timer Capture Modules stop on emulation suspend
EQep1Regs.QEPCTL.bit.PCRM = 1; // Position Counter Reset on Maximum Position
EQep1Regs.QPOSMAX = 479; // Position Counter gets zero after 480 Positions(120 slots)
EQep1Regs.QEPCTL.bit.QPEN = 1; // Enable the eQEP Position Counter
EQep1Regs.QCAPCTL.bit.CEN = 1; // Enable eQEP Capture Module
EQep1Regs.QCAPCTL.bit.UPPS = 2; //5; // Unit event is set after 4 Clock Pulses
EQep1Regs.QCAPCTL.bit.CCPS = 7; // Capture Timer clock is prescaled by /128
I am getting correct speed. However I need to implement something that can detect whether both eqep A and B signals are coming or not. So if both the signals are proper I get UPEVNTS and QDC flags remain 0, is what my understanding is(Please correct me if I am wrong).
However, if any one of the signal comes like either A or B and the other is missing, then I will get an UPEVNT still(delayed as compared to healthy case) and QDC bit becomes high, is what my observation is.
I had a few queries related to these:
1. What is the logic inside the DSP which has been implemented to cause QDC to become high if one signal goes missing? How does it detect so?
2. The QDC flag remains high , if not cleared(even if the abnormal situation due to which it became high goes away). Why?
3. What is the timing of the QDC flag to become high. What i mean to say is, if I am removing one signal, the other one is still there, so at what instant of time does the DSP take the action of making QDC flag high. Is it based on QCLK or UPEVNT or what is the time instant?
4. Does the QDC flag becoming high has anything to do with what speed the motor is rotating currently at? I feel and observe that at higher speeds I get QDC flag appearance very frequently as opposed to lower speeds, where I get QDC high after quite some time( Please Note that once I get a QDC high, I am clearing it as because it doesnt clear by itself. So the appearance of the next QDC is what I am asking about.)
5. What is the major difference between QDC and QDF flag. What is the purpose for each of them?
Kindly note that the speed calculation which I do in the software is not based on delta X/T or X/delta T as mentioned in Manual.
It will be very much helpful for my project, if anyone could answer and clarify on the same.
Regards,
Prarambhik