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/TMS320F28035: comparator delay

Part Number: TMS320F28035
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi TI experts,

I am working on the TI example of comparators asynchronously tripping PWM from the following directory.

C:\ti\c2000\C2000Ware_2_00_00_02\device_support\f2803x\examples\c28\epwm_dcevent_trip_comp

I used the use DAC instead of pin COMP1B. 

    //
    // Connect the inverting input to pin COMP1B
    //
//    Comp1Regs.COMPCTL.bit.COMPSOURCE = 1;
   
    //
    // Uncomment following 2 lines to use DAC instead of pin COMP1B
    //
    // Connect the inverting input to the internal DAC
    //
    Comp1Regs.COMPCTL.bit.COMPSOURCE = 0;
    Comp1Regs.DACVAL.bit.DACVAL = 512;  // Set DAC output to midpoint

I tested the delay is around 150 to 200ns between shorting ADC A2 to the ground and the response of the PWM signal with an oscilloscope. I tested several times and the results were consistent. I did not change any code of the example, except the ones shown above to choose DAC instead of pin COMP1B. I believe it is implemented asynchronously, and the delay should be minimal.

Could you please comment on why I get 150 to 200ns delay? Am I missing something? Could you point to some data showing the expected delay of asynchronously shutting down PWM?

Thank you in advance.

  • Iv Y,

    I recommend also enabling the COMP1OUT signal to a GPIO pin.  Can you see if the delay from COMP1OUT assert to EPWM trip consistent?  This will help to determine if the variation is coming from the comparator trip qualification or from the post-qualification signal path.

    -Tommy

  • Iv Y,

    It has been a while since your last update.  I assume that you were able to resolve your issue.

    If not, please reply to this thread.  If the thread has locked due to timeout, please create a new thread describing the current status of your issue.

    -Tommy