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.

TMS320F28379D: Hysteresis issue on the CMPSS

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Hello,

My customer is experimenting the F28379D CMPSS module on the LaunchPad board. He noticed that with a slow changing analog input signal, the output comparator oscillates. Increasing the hysteresis setting somewhat alleviates the issue but does not fix it.

Maybe it is a setting issue? I have transferred on Box (link) the source code of their settings as well as a couple of screenshots. Please let me know your feedback. Thank you.


Best regards,
François.

  • Hi Francois,

    Thanks for providing the screenshots. With hysteresis enabled, you shouldn't see this but I'll try to reproduce what you are experiencing. I need you to confirm a few things:

    1) What is the slope of the input signal that exhibits this?
    2) Is DACVAL set to 2048?
    3) What is VDDA voltage? Is VDDA very noisy? The comparator itself will be fairly immune to noise on VDDA but the compdac will not be immune to noisy VDDA if SELREF = 0.
  • Hi Frank,

    We observed these oscillations with this configuration :
    - Input signal : triangular signal, 0-3 Volts at 1kHz to 100 kHz provided by a GBF
    - DACLVAL is at 2048
    - This is the Launchpad F28379D, so VDDA is set by the board, so 3v if i remember correctly. And this board is powered by USB, so if something wrong, this is a problem on this board. SELREF is set to 0.
    - And the hysteresis is already set to 4 (the max value).

    Sincerly,
    Cyril
  • Hi Cyril,

    Thanks. I missed the part about the LP. I'll test this on the LP and let you know by Friday.
  • Hi Cyril,

    I was unable to look into this today as promised since i got pulled into something else. I'll look at it early next week. Thanks for your patience.
  • Hi Frank,

    I would appreciate if you could prioritize this issue. This is a showstopper in my customer's evaluation. Thank you.


    Best regards,
    François.

  • Hi Cyril/Francois,

    Apologies for the delay. I've tried this on the Launchpad by modifying one of the C2000Ware CMPSS examples. The input signal is a 3.3V pk-pk 50KHz ramp wave. This input is within your issue range. If i ran with hysteresis disabled, i see some noise on the output as expected. I'm using the asynch output which is the most affected by noise. With hysteresis of 1x, the output is still noisy. Hysteresis of 2x or greater eliminates the noise. The amount of hysteresis to apply is dependent on how noisy the inputs are. It's entirely possible to ran out of hysteresis If your input noise band goes out of the hysteresis region. I believe this is what you are seeing.

    Some extra details: The hysteresis on the F28379D device is almost like a digital hysteresis. The voltage on the negative input will not be adjusted until the output registers a clean high. The other point to keep in mind is, the comparator output is undefined for pos_input = neg_input. If your input is very slow and noisy, you will most likely ran into this condition multiple times.

    I think your issue is from a noisy input. Try zooming in on your scope to confirm this and turn off any scope filtering. Even with max hysteresis of 4x, you are looking at 38mV margin. You can try to cleanup your input signal by putting a LPF on it. If that doesn't help, you might want to try using the CMPSS filter. The filter will delay your output signal a bit but might help. Below are the screenshots of the experiments i ran.

  • Hi Cyril/Francois,

    Is the issue resolved? Did you try the suggested experiments?
  • Hi Francois,

    I know you mentioned your customer is looking into this. Bumping this thread in the meantime so it doesn't lock.
  • Hi Frank,

    After discussion, my customer's concern with a CMPSS output that could oscillate is that it somewhat defeats its purpose of protecting the power transistors by not effectively tripping the PWM outputs when the signal is out of range, but stays within the hysteresis window.

    I have seen the following in a general C2000 presentation: "Removal of unwanted noise and PWM trip triggering is easy with blanking window and filtering features provided with the analog comparator subsystems." However I could not find an application note that uses these mechanisms. Do you have any material that illustrates the mechanisms we have to remove unwanted noise? Thank you.


    Best regards,
    François.
  • Hi François,

    Your customer's understanding is incorrect. Hysteresis on the F28379 device does not change the trip voltage, it only changes the untrip voltage. Your signal will always trip at the same voltage. Hysteresis will be the least intrusive way to combat noise because it doesn't change your trip voltage and doesn't delay the trip. The CMPSS filter is also another way to combat noise. It also doesn't change your trip voltage but it will delay your trip. I'm not aware of an app note for this.

    As i demonstrated in my previous mail, hysteresis works but it's limited to 4x (38mV). However, if in your application you are maxing out hysteresis because the noise in your input signal is > 38mV, then you should look into cleaning up your input signal to remove the bulk of the noise and utilize hysteresis for the last mile. One suggestion as i mentioned before was to use a LPF. Also, have they explored adding the CMPSS filter to this?
  • Hi Frank,

    My customer claims that noise should not be the source of the CMPSS output oscillation as he uses the LaunchPad with a signal generator. No power circuitry is being controlled there that could generate noise.

    You mentioned that the comparator output is undefined for pos_input = neg_input. What is the voltage difference between these inputs below which the comparator output is undefined? I could not find this information.


    Best regards,
    François.
  • François,

    If the comparator output is oscillating, then there is noise on it's input because the comparator won't just oscillate by itself. The noise is most likely coming from the signal generator.

    What i meant by the comparator output being undefined for pos_input = neg_input is that when both inputs are equal, you don't know if the output will be 0 or 1. However, it will be one or the other. If the output goes to 1, hysteresis will take over. The voltage delta between the inputs before the trip happens is the comparator and compdac offset. This is specified in the datasheet.
  • Hi François,

    Is this clear or do you still have questions on this?