Tool/software:
I implemented a simple feature: use CMPSS1.LOW_COMPARATOR to compare an external voltage with internal threshold voltage -- internal threshold voltage is generated through CMPSS1's internal DAC(for example, set as 1500). When external voltage is lower than internal threshold voltage(for example, 1500), CMPSS1.CTRIPL trips all EPWMs.
- I am sure CMPSS1.LOW_COMPARATOR is configured correctly; we verified with experimentations:
- when external voltage is LOWER than internal threshold voltage(for example, 1500), CMPSS1regs.COMPSTS.COMPLSTS = 1 -- this is correct
- when external voltage is HIGHER than internal threshold voltage(for example, 1500), CMPSS1regs.COMPSTS.COMPLSTS = 0 -- this is correct
- CMPSS1.LOW_COMPARATOR.CTRIPL is used to trip EPWMs with the following lines to connect through ePWM X-BAR to TRIP10 :
XBAR_setEPWMMuxConfig(XBAR_TRIP10, XBAR_EPWM_MUX01_CMPSS1_CTRIPL);
XBAR_enableEPWMMux(XBAR_TRIP10, XBAR_MUX01);
- The strange thing is:
- If I comment out the line " XBAR_enableEPWMMux(XBAR_TRIP10, XBAR_MUX01) " above to disconnect XBAR, EPWMs work normally and are NOT tripped -- this is correct
- If I add back the line " XBAR_enableEPWMMux(XBAR_TRIP10, XBAR_MUX01) " above to connect XBAR, no matter if external voltage is LOWER or HIGHER than internal threshold voltage(for example, 1500), i.e: no matter if CMPSS1regs.COMPSTS.COMPLSTS = 1 or =0, EPWMs are immediately tripped
but there is only one explicit trip source which is realized with:
XBAR_setEPWMMuxConfig(XBAR_TRIP10, XBAR_EPWM_MUX01_CMPSS1_CTRIPL) ;
why are EPWMs tripped no matter what CMPSS1 output? Why are EPWMs tripped no matter if external voltage is LOWER or HIGHER than internal threshold voltage(for example, 1500), i.e: no matter if CMPSS1regs.COMPSTS.COMPLSTS = 1 or =0 ?
