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.

TMS320F280049: CMPSS output

Part Number: TMS320F280049


Hello Champs,

Customer found that in F280049 when CTRIPHSEL was only set to 0 (Asynchronous comparator output drives CTRIPH) the comparator output can normally toggle. But When set to 1(Synchronous comparator output drives CTRIPH) or set 2 (Output of digital filter drives CTRIPH) the comparator output cannot toggle.

Would you please kindly help? Thanks!

Best Regards,

Linda

  • Linda,

    Can you share their CMPSS and GPIO X-BAR Output settings?

    -Tommy

  • Linda,

    Can you clarify the endpoint of the comparator output? Is it toggling a GPIO output pin or is it feeding into an EPWM event?

    -Tommy
  • Hi Linda,

    I received your code through email. I haven't completely gone through it but right away, a few things are sticking out.

    1. Your filter initialization sequence is incorrect. Please follow the sequence in the TRM or you can use the "cmpss_digital_filter_cpu01" example.

    2. Your filter settings is incorrect. Threshold should be greater than 1/2 Window. In your code, you have SAMPWIN=15 and THRESH=5.

    3. Some of your comments don't match the settings so i'm not sure if the wording in the comment is the behavior you expect. For instance, to load the COMPDAC on PWMSYNC, SWLOADSEL needs to be 1.

    I'll follow up to this post as i find more things.

  • Linda,

    I've gone through the whole code. You have some lines of code that is writing to COMPSTSCLR register without EALLOW. COMPSTSCLR is a EALLOW register. Doesn't really matter in the section of code you have in the CompInit function but it's something to keep in mind.

    Your issue is actually quite similar to this post -> https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/667891. The suggestion for him should also apply in your case which is: if you have the CMPSS setup to trip the EPWM and seeing unexpected results, for debug purposes, you should also enable the CMPSS output (CTRIPOUTH) on a GPIO to see if the trips are actually what you expect. This will at least narrow down your problem to the CMPSS or the EPWM.

    Please apply the suggested fixes and let us know if it works.