TMS320F28P551SG: How to use HRPWR.CALPWRON

Part Number: TMS320F28P551SG

Hi champs,

 

I am asking this for our customer.

 

In the TRM SPRUJF8 – MAY 2026, there is 

18.17.2.18 HRPWR Register (Offset = 21h) [Reset = 0000h]

image.png

 

Questions:

  1. Shoud the user enable CALPWRON in the initialization? When should the user use it?
  2. It says it is only available on EPWM1. If the user only uses another EPWM other than EPWM1, say EPWM6, does the user still need to set EPWM1.HRPWR.CALPWRON or the user can just set EPWM6.HRPWR.CALPWRON?
  3. What is the driverlib API used to enable CALPWRON?
  4. Does HRPWR.CALPWRON have something to do with HRCNFG.AUTOCONV and SFO()? If yes, what is their relation?
  • Hi,

    CALPWRON enables the MEP calibration circuitry. When using TI’s SFO library, a separate manual write is not required, because SFO() manages this register internally. Run SFO during initialization until it returns SFO_COMPLETE, handle SFO_ERROR, and call it periodically during operation to track temperature and voltage changes. Ordinary ePWM operation without HRPWM does not require MEP calibration. 

    The calibration circuitry is shared, and CALPWRON is available only through ePWM1. Therefore, the relevant bit is EPwm1Regs.HRPWR.bit.CALPWRON, even when the HRPWM output is generated by ePWM6. Writing EPwm6Regs.HRPWR.CALPWRON does not enable calibration. The SFO calibration result applies to all HRPWM channels. 

    There is no dedicated DriverLib API for CALPWRON in the F28P551x DriverLib. The recommended approach is to use SFO() and let the library manage calibration.

    HRPWM_enableAutoConversion() controls AUTOCONV, not CALPWRON.

    The relation is:

    CALPWRON: Powers the hardware used for MEP calibration.

    SFO(): Uses that hardware to calculate MEP_ScaleFactor and update HRMSTEP.

    AUTOCONV: Uses HRMSTEP to convert a fractional PWM command into the appropriate number of MEP steps.

    AUTOCONV does not perform calibration or replace SFO. With AUTOCONV disabled, software must calculate the MEP-scaled values itself. For automatic conversion on ePWM6, use HRPWM_enableAutoConversion(EPWM6_BASE) and continue calling SFO periodically. 

    Best regards, 

    Masoud