Once the EPWM has been configured to provide
conventional PWM of a given frequency and polarity, the HRPWM is configured by
programming the HRPWM_HRCTL register located at offset address 40h. This register
provides configuration options for the following key operating modes:
- Edge Mode: The MEP can
be programmed to provide precise position control on the rising edge (RE),
falling edge (FE), or both edges (BE) at the same time. FE and RE are used
for power topologies requiring duty cycle control, while BE is used for
topologies requiring phase shifting, for example, phase shifted full
bridge.
- Control Mode: The MEP
is programmed to be controlled either from the HRPWM_CMPAHR register (duty
cycle control) or the HRPWM_TBPHSHR register (phase control). RE or FE
control mode should be used with the HRPWM_CMPAHR register. BE control mode
should be used with the HRPWM_TBPHSHR register.
- Shadow Mode: This mode
provides the same shadowing (double buffering) option as in regular PWM
mode. This option is valid only when operating from the HRPWM_CMPAHR
register and should be chosen to be the same as the regular load option for
the CMPA register. If the HRPWM_TBPHSHR register is used, then this option
has no effect.