AM2634: PWMXBAR status

Part Number: AM2634

Tool/software:

Follow up to -  AM2634: How to detect CMPSS or SDFM comparator triggered PWM XBAR 

If you configure CMPSSA, syscfg shows it will be grouped to group 1, CMPSSB to group 2, and SDFM EVT to group 3

SOC_xbarSelectPWMXBarInputSource(CSL_CONTROLSS_PWMXBAR_U_BASE, 0, ( EPWM_XBAR_CMPSSA0_CTRIPL ), ( EPWM_XBAR_CMPSSB0_CTRIPL ), ( EPWM_XBAR_SD0_FILT1_EVT1 | EPWM_XBAR_SD1_FILT0_EVT1 ), 0, 0, 0, 0, 0, 0);

How can I use SOC_xbarGetPWMXBarOutputSignalLatchedFlag() to know which CMPSSA, which CMPSSB, or which SDFM Comparator caused the PWMXBAR to trigger?

software-dl.ti.com/.../group__DRV__SOC__XBAR__MODULE.html

Thanks!
  • Hey Justin,

    Thanks for reaching out. I have assigned this to our XBAR SW/API owner to address your question. Please allow them some time to review and provide a response.

    Best Regards,

    Zackary Fleenor

  • Thanks Zack,

    Quick update here - I've tested multiple CMPSSAs and CMPSSBs and they all result with SOC_xbarGetPWMXBarOutputSignalLatchedFlag() returning a latched value of 8 after a CMPSS fires. There doesnt seem to be traceability to which CMPSSA or CMPSSB or SDFM comparator triggered the PWMXBAR.

    Thoughts?

    Thanks!

  • Hi Justin!

    SOC_xbarSelectPWMXBarInputSource(CSL_CONTROLSS_PWMXBAR_U_BASE, 0, ( EPWM_XBAR_CMPSSA0_CTRIPL ), ( EPWM_XBAR_CMPSSB0_CTRIPL ), ( EPWM_XBAR_SD0_FILT1_EVT1 | EPWM_XBAR_SD1_FILT0_EVT1 ), 0, 0, 0, 0, 0, 0);

    Here, you are configuring PWMXbar0 with all the three sources, so you will end up with single flag status. instead, could you try the "elagant" way we discussed over call, i.e., Configuring 3 different PWMXbars, each with different sources, so we will have 3 flag status bits (PS, you may have to use the combinational trip at DC submodule on EPWM)?

    Thanks,

    Madhava 

  • If I do this, i see an easy way to distinguish between the 3 different xbars, on which is triggering. But how do i distinguish between CMPSSA, CMPSSB, and the sdfm comparators when one triggers?

    Thanks!

  • Justin,

    Yes! Since, you would have configured different sources for each of the Xbar, upon knowing which Xbar has triggered trip, we could iterate over the enabled sources for that particular Xbar. I couldn't think of a better way. 

    For Example, Say we have configured CMPSSA0 on PWMXbar0, CMPSSB0 on PWMXbar1, and SDFM0 Trips on PWMXbar2. A trip has occurred on EPWM configured. Then,

    • We check PWMXbar Flag Status and we may see b'001
      • This would mean PWMXbar0 has tripped the EPWM.
      • Since PWMXbar0 is only configured with CMPSSA0's Trip signal, we then move on to CMPSSA0's status and see what caused the trip.

    Thanks!