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.

TMS320F28377D: eCAP module malfunction

Part Number: TMS320F28377D

Hi ,

I use eCAP1,eCAP2,eCAP3 to detect the zero-crossing of  3-phase power  supply system.

Normally, the cap1, cap2, cap3, and cap4 values ​​in the cap register are between 0x00180000 & 0x001B0000.

However, when the slope of the input signal is gentle, there is a chance that ecap will malfunction.

When the malfunction occurs, no noise is observed from the oscilloscope.

From the CCS debug, it will capture noise such as CAP1=0 and CAP2=1.

Any idea about why the capture register equal zero noise occurs when the signal slope is flat?


-------------------------------------------------------------------------------------

Red: error detect trigger Yellow: eCAP input signal

When an eCAP error occurs, store the CAP1, CAP2, CAP3, and CAP4 values ​​in the cap register into the Errcap buffer to see if it captures noise.
In Errcap, some CAP value is zero.



CAP1 Polarity is rising edge,
CAP2 Polarity is Falling edge,
CAP3 Polarity is rising edge,
CAP4 Polarity is Falling edge,

------------------------------------------------------

best regards,
Simen

  • Hi Simen,

    Can you expand a bit on your description. How are you using the ECAP to detect zero-crossing? The ECAP is a digital module and will only function correctly for fast rising/falling input signals. Looks like your input signal has a very slow slew, looking more like an analog signal than digital.
  • Hi Frank,

    Line power is a 60Hz signal, then use voltage divider circuit and comparator , then connect to eCAP pin.
    Between the comparator and eCAP pin, parallel a capacitance to suppress noise.
    The capacitance let the input signal be a slow slew.
    thanks,

    best regards,
    Simen
  • Simen,

    You can probably fix this with GPIO input qualification. It is likely the long time spent in the switching threshold which is causing the issue (see GPxCTRL and GPxQSEL1/2 registers for qualification configuration).

    Regards,
    Kris

  • Simen,

    To add to what Kris said. Don't put a capacitor on a digital pin. The output from the comparator is digital and you don't want to slew a digital signal unless you know what you are doing. If the output from the comparator is noisy, the better way to address that is to use the digital filter that is in the CMPSS.
  • Hi Simen,

    Did the responses answer your question? If yes, please mark as resolved so i can close this post.
  • Hi Frank and Kris,

    Thanks for your suggestions.

    However, we need to use eCAP to get the periods.

    And digital filter can not be set too wide windows,because we must monitor these pin to observe Anti-Island effect.

    Other experiments observe that eCAP capture a bigger noise (CAP1=0x1,CAP2=0x4C as below picture errcap variables).

    But  noise still  is not observed from the oscilloscope.

    I have some question:

    1. Does eCAP trig by GPIO VIH and VIL? (On datasheet, VIH is 2.0V , VIL is 0.8V)

    2. Why eCAP capture zero width noise? (On datasheet, eCAP timming is 2tc(SYSCLK))

     3. Why eCAP capture the pulse, but the pulse cannot be observed from the oscilloscope?

    4. What range slope can be accepted by eCAP module?

    best regards,

    Simen

  • Simen,

    1. Does eCAP trig by GPIO VIH and VIL? (On datasheet, VIH is 2.0V , VIL is 0.8V)

    Yes. However, the region between 0.8V and 2.0V is undefined.

    2. Why eCAP capture zero width noise? (On datasheet, eCAP timming is 2tc(SYSCLK))

    Pulse has to be a minimum of 2sysclk.

     3. Why eCAP capture the pulse, but the pulse cannot be observed from the oscilloscope?

    Not sure, but i believe this is because you are slewing the signal.

    4. What range slope can be accepted by eCAP module?

    We don't have a definition for this.

    I believe you are approaching this the wrong way. Will it be possible for you to show a quick diagram of what you are doing. Which connections go to which etc? So i can better understand what you are doing.

  • Hi Simen,

    It's been a week since we heard back from you. Is your issue resolved?
  • Hi Frank,

    I get SCH picture from EE.

    Do you give some suggestion for eCAP detection circuit?

    After decrease CP769 & CP770 cap value, the result is better.

    thanks,

    best regards,

    Simen

  • Hi Simen,

    I'm not sure which other way to say it. You are seeing this issue because you are putting a big cap on a "digital" signal which is heavily slewing the signal. You are essentially feeding a analog signal to a digital module.

    Furthermore, the ECAP is not designed to do zero-crossing. It only measures the duration of pulses. You need to pass the signal through the internal CMPSS and feed the output of the CMPSS to the ECAP.
  • Hi Frank,

    Thank you very much for providing so many opinions.

    best regards,
    Simen
  • Hi Simen,

    Glad i could help! Let us know if you have any more questions.