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.

SFO_MepDis_V5 Clarification


Team,

In the F28335 HRPWM documentation SPRUG02, it stated specifically that the SFO_MepDis_V5() cannot be used on an ePWM channel while the HRPWM capabilities are enabled for that channel. However, in the SFO_V5 example in SPRC530 the following code was shown:

for(i=1;i<PWM_CH;i++)
{
 // Enable HRPWM logic for channel prior to calibration
 (*ePWM[i]).HRCNFG.bit.EDGMODE = 1;

 // returns "0" when cal. incomplete for channel
 while ( SFO_MepDis_V5(i) == SFO_INCOMPLETE );
}

As the above code shows, the HRPWM logic was enabled for each channel *BEFORE* SFO_MepDis_V5() was called. Appendix A of the document shows this same code without the HRPWM logic being enabled. Which method is correct, the example code or the documentation?

Regards,

Tim Love

  • Tim,

    What the documentation means is that, the high-res. waveform will not be accurate while running the MepDis calibration - basically the high-resolution output on the ePWM pins is useless - this is why it states that while high-res capabilities are enabled, MepDis should not be used.

    BUT, in order for the high-resolution calibration logic to be enabled, the HRCNFG[EDGMODE] bits must be non-zero (otherwise the HRPWM logic will not be enabled for calibration).

     Hope that helps.

    -Chrissy

  • Chrissy,

    Thanks for the response. This makes sense. We may want to consider adding this clarification to the User's Guide so it is not confusing to customers.

    Regards,

    Tim Love