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.

CCS/UCD3138: Analog comparator set up

Part Number: UCD3138

Tool/software: Code Composer Studio

Is it possible to turn off the PWM by detecting the analog comparator multiple times?
Please tell me the function of cycle by cycle.

  • It is possible to turn off the DPWM by detecting an analog comparator multiple times.  That's what the various max count registers are for in the DPWM fault control register.  However, the CBC has a different purpose.  It does cycle by cycle turn off.  This means that it turns the DPWM A output off when the comparator is triggered.  The B output is turned on the programmed dead time after the turn off.  Then at the beginning of the next switching cycle, the DPWM A is turned on again.

    The CBC can be used to regulate peak current on each cycle.  It is also used in conjunction with a special ramp function for Peak Current Mode, where the ramp is provided by the front end circuitry, and the start point of the ramp is from the filter.  

    See the Technical Reference Manual for more information on both uses of CBC.  There is also a CBC fault with it's on max count which turns the DPWM off permanently until it is reset by firmware like all the other standard fault settings.  

  • Thank you for your reply.

    I have another question.

    Is the sampling frequency of the analog comparator 250MHz?
    Is it possible to change the sampling frequency of the analog comparator?

  • The analog comparator is a comparator.  It is continuously on.  There is a bit of digital logic involved, but I believe it is sampling at about 30 MHz.  so it is much faster than the bandwidth of the signal.  The CBC is cleared at the end of the switching cycle, but that's not a sampling frequency.  

  •  Thank you for your reply.

    I have questions about AB_MAX_COUNT.

    Is count of FAULT AB cleared  every switching cycle? or is there a way to clear this count ?

  • The count requires sequential switching cycles with a fault.  If there is a whole switching cycle with no fault, the count is cleared.

  • I have another question.

    I set DPWMINT.FLT_AB_INT_EN = 1. (AB_MAX_COUNT =3)

    A voltage above the threshold has been applied to the analog comparator.

    The PWM does stop at that time, but the fast interrupt sometimes does not occur. Have you ever seen such a phenomenon?

    Is there a way to detect the PWM stop with software when the PWM stops but the fast interrupt does not occur?

  • We have seen that with short signals, or glitches, sometimes the DPWM fault logic will stop the DPWM, but the fault mux interrupt will not occur.

    This is because the logic path for the two occurrences is actually different.  w

    If you are using a signal to stop the DPWM, there is an interrupt available from the DPWM, and we strongly suggest that you use this instead of the fault mux interrupt.