46 #include "sw/modules/types/src/types.h"
69 #define PWM_ePWM1_BASE_ADDR (0x00006800)
73 #define PWM_ePWM2_BASE_ADDR (0x00006840)
77 #define PWM_ePWM3_BASE_ADDR (0x00006880)
81 #define PWM_ePWM4_BASE_ADDR (0x000068C0)
85 #define PWM_ePWM5_BASE_ADDR (0x00006900)
89 #define PWM_ePWM6_BASE_ADDR (0x00006940)
93 #define PWM_ePWM7_BASE_ADDR (0x00006980)
97 #define PWM_ePWM8_BASE_ADDR (0x000069C0)
101 #define PWM_AQCTL_ZRO_BITS (3 << 0)
105 #define PWM_AQCTL_PRD_BITS (3 << 2)
109 #define PWM_AQCTL_CAU_BITS (3 << 4)
113 #define PWM_AQCTL_CAD_BITS (3 << 6)
117 #define PWM_AQCTL_CBU_BITS (3 << 8)
121 #define PWM_AQCTL_CBD_BITS (3 << 10)
125 #define PWM_AQCSFRC_CSFA_BITS (3 << 0)
129 #define PWM_AQCSFRC_CSFB_BITS (3 << 2)
133 #define PWM_CMPCTL_LOADAMODE_BITS (3 << 0)
137 #define PWM_CMPCTL_LOADBMODE_BITS (3 << 2)
141 #define PWM_CMPCTL_SHDWAMODE_BITS (1 << 4)
145 #define PWM_CMPCTL_SHDWBMODE_BITS (1 << 6)
149 #define PWM_CMPCTL_SHDWAFULL_BITS (1 << 8)
153 #define PWM_CMPCTL_SHDWBFULL_BITS (1 << 9)
158 #define PWM_DBCTL_OUTMODE_BITS (3 << 0)
162 #define PWM_DBCTL_POLSEL_BITS (3 << 2)
166 #define PWM_DBCTL_INMODE_BITS (3 << 4)
170 #define PWM_DBCTL_HALFCYCLE_BITS (1 << 15)
175 #define PWM_ETCLR_INT_BITS (1 << 0)
179 #define PWM_ETCLR_SOCA_BITS (1 << 2)
183 #define PWM_ETCLR_SOCB_BITS (1 << 3)
188 #define PWM_ETPS_INTPRD_BITS (3 << 0)
192 #define PWM_ETPS_INTCNT_BITS (3 << 2)
196 #define PWM_ETPS_SOCAPRD_BITS (3 << 8)
200 #define PWM_ETPS_SOCACNT_BITS (3 << 10)
204 #define PWM_ETPS_SOCBPRD_BITS (3 << 12)
208 #define PWM_ETPS_SOCBCNT_BITS (3 << 14)
213 #define PWM_ETSEL_INTSEL_BITS (7 << 0)
217 #define PWM_ETSEL_INTEN_BITS (1 << 3)
221 #define PWM_ETSEL_SOCASEL_BITS (7 << 8)
225 #define PWM_ETSEL_SOCAEN_BITS (1 << 11)
229 #define PWM_ETSEL_SOCBSEL_BITS (7 << 12)
233 #define PWM_ETSEL_SOCBEN_BITS (1 << 15)
238 #define PWM_PCCTL_CHPEN_BITS (1 << 0)
242 #define PWM_PCCTL_OSHTWTH_BITS (15 << 1)
246 #define PWM_PCCTL_CHPFREQ_BITS (7 << 5)
250 #define PWM_PCCTL_CHPDUTY_BITS (7 << 8)
254 #define PWM_HRCNFG_EDGMODE_BITS (3 << 0)
258 #define PWM_HRCNFG_CTLMODE_BITS (1 << 2)
262 #define PWM_HRCNFG_HRLOAD_BITS (3 << 3)
266 #define PWM_HRCNFG_SELOUTB_BITS (1 << 5)
270 #define PWM_HRCNFG_AUTOCONV_BITS (1 << 6)
274 #define PWM_HRCNFG_SWAPAB_BITS (1 << 7)
278 #define PWM_HRPCTL_HRPE_BITS (1 << 0)
282 #define PWM_HRPCTL_PWMSYNCSEL_BITS (1 << 1)
286 #define PWM_HRPCTL_TBPHSHRLOADE_BITS (1 << 2)
290 #define PWM_TBCTL_CTRMODE_BITS (3 << 0)
294 #define PWM_TBCTL_PHSEN_BITS (1 << 2)
298 #define PWM_TBCTL_PRDLD_BITS (1 << 3)
302 #define PWM_TBCTL_SYNCOSEL_BITS (3 << 4)
306 #define PWM_TBCTL_SWFSYNC_BITS (1 << 6)
310 #define PWM_TBCTL_HSPCLKDIV_BITS (7 << 7)
314 #define PWM_TBCTL_CLKDIV_BITS (7 << 10)
318 #define PWM_TBCTL_PHSDIR_BITS (1 << 13)
322 #define PWM_TBCTL_FREESOFT_BITS (3 << 14)
327 #define PWM_TZCLR_INT_BITS (1 << 0)
331 #define PWM_TZCLR_CBC_BITS (1 << 1)
335 #define PWM_TZCLR_OST_BITS (1 << 2)
339 #define PWM_TZCLR_DCAEVT1_BITS (1 << 3)
343 #define PWM_TZCLR_DCAEVT2_BITS (1 << 4)
347 #define PWM_TZCLR_DCBEVT1_BITS (1 << 5)
351 #define PWM_TZCLR_DCBEVT2_BITS (1 << 6)
356 #define PWM_TZCTL_TZA_BITS (3 << 0)
360 #define PWM_TZCTL_TZB_BITS (3 << 2)
364 #define PWM_TZCTL_DCAEVT1_BITS (3 << 4)
368 #define PWM_TZCTL_DCAEVT2_BITS (3 << 6)
372 #define PWM_TZCTL_DCBEVT1_BITS (3 << 8)
376 #define PWM_TZCTL_DCBEVT2_BITS (3 << 10)
381 #define PWM_TZFRC_CBC_BITS (1 << 1)
385 #define PWM_TZFRC_OST_BITS (1 << 2)
389 #define PWM_TZFRC_DCAEVT1_BITS (1 << 3)
393 #define PWM_TZFRC_DCAEVT2_BITS (1 << 4)
397 #define PWM_TZFRC_DCBEVT1_BITS (1 << 5)
401 #define PWM_TZFRC_DCBEVT2_BITS (1 << 6)
406 #define PWM_TZDCSEL_DCAEVT1_BITS (7 << 0)
410 #define PWM_TZDCSEL_DCAEVT2_BITS (7 << 3)
414 #define PWM_TZDCSEL_DCBEVT1_BITS (7 << 6)
418 #define PWM_TZDCSEL_DCBEVT2_BITS (7 << 9)
423 #define PWM_DCTRIPSEL_DCAHCOMPSEL_BITS (15 << 0)
427 #define PWM_DCTRIPSEL_DCALCOMPSEL_BITS (15 << 4)
431 #define PWM_DCTRIPSEL_DCBHCOMPSEL_BITS (15 << 8)
435 #define PWM_DCTRIPSEL_DCBLCOMPSEL_BITS (15 << 12)
440 #define PWM_DCFCTL_SRCSEL_BITS (3 << 0)
444 #define PWM_DCFCTL_BLANKE_BITS (1 << 2)
448 #define PWM_DCFCTL_BLANKINV_BITS (1 << 3)
452 #define PWM_DCFCTL_PULSESEL_BITS (3 << 4)
1226 return (pwm->
TBPRD);
1303 extern PWM_Handle
PWM_init(
void *pMemory,
const size_t numBytes);
1419 extern void PWM_setCount(PWM_Handle pwmHandle,
const uint16_t count);
1476 const uint16_t offset);
1483 const uint16_t window);
1502 const bool selectFilter,
1503 const bool disableSync,
1504 const bool enableSoc,
1505 const bool generateSync);
1513 const bool selectFilter,
1514 const bool disableSync);
1524 const bool selectFilter,
1525 const bool disableSync,
1526 const bool enableSoc,
1527 const bool generateSync);
1535 const bool selectFilter,
1536 const bool disableSync);
1596 extern void PWM_setPeriod(PWM_Handle pwmHandle,
const uint16_t period);
1601 extern void PWM_setPeriodHr(PWM_Handle pwmHandle,
const uint16_t period);
1606 extern void PWM_setPhase(PWM_Handle pwmHandle,
const uint16_t phase);
1735 pwm->
CMPA = pwmData;
1744 static inline void PWM_setCmpA(PWM_Handle pwmHandle,
const uint16_t pwmData)
1748 pwm->
CMPA = pwmData;
1772 pwm->
CMPB = pwmData;
1781 static inline void PWM_setCmpB(PWM_Handle pwmHandle,
const uint16_t pwmData)
1785 pwm->
CMPB = pwmData;
1793 #endif // extern "C"
1796 #endif // end of _PWM_H_ definition
volatile uint16_t TBCTL
Time-Base Control Register.
PWM_ClkDiv_e
Enumeration to define the pulse width modulation (PWM) clock dividers.
uint16_t PWM_getDeadBandFallingEdgeDelay(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) deadband falling edge delay.
PWM_ActionQual_e
Enumeration to define the pulse width modulation (PWM) action qualifiers.
volatile uint16_t DCCAPCTL
Digital Compare Capture Control.
uint16_t PWM_getDeadBandRisingEdgeDelay(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) deadband rising edge delay.
volatile uint16_t ETFLG
Event trigger flags.
void PWM_setIntMode(PWM_Handle pwmHandle, const PWM_IntMode_e intMode)
Sets the pulse width modulation (PWM) interrupt mode.
void PWM_setClkDiv(PWM_Handle pwmHandle, const PWM_ClkDiv_e clkDiv)
Sets the pulse width modulation (PWM) clock divisor.
static uint16_t PWM_getCmpA(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) data value from the Counter Compare A hardware.
volatile uint16_t DCFWINDOWCNT
Digital Compare Filter Window Counter.
void PWM_decrementDeadBandFallingEdgeDelay(PWM_Handle pwmHandle)
Decrement the dead band falling edge delay.
void PWM_disableTripZones(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) trip zones.
volatile uint16_t rsvd_4
Reserved.
volatile uint16_t rsvd_1
Reserved.
void PWM_setDigitalCompareBEvent2(PWM_Handle pwmHandle, const bool selectFilter, const bool disableSync)
Sets the pulse width modulation (PWM) digital compare B event 2 source parameters.
#define DISABLE_PROTECTED_REGISTER_WRITE_MODE
Define to disable protected register writes.
void PWM_disableDigitalCompareBlankingWindow(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) digital compare blanking window.
volatile uint16_t AQCTLA
Action-Qualifier Control Register for Output A (EPWMxA)
struct _PWM_Obj_ PWM_Obj
Defines the pulse width modulation (PWM) object.
PWM_DeadBandOutputMode_e
Enumeration to define the pulse width modulation (PWM) deadband output modes.
void PWM_setTripZoneState_DCBEVT1(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
Sets the pulse width modulation (PWM) trip zone state for Digital Compare Output B Event 1 (DCBEVT1) ...
Digital Compare A Event 2 Trip Zone flag.
void PWM_decrementDeadBandRisingEdgeDelay(PWM_Handle pwmHandle)
Decrement the dead band rising edge delay.
static void PWM_write_CmpA(PWM_Handle pwmHandle, const uint16_t pwmData)
Writes the pulse width modulation (PWM) data value to the Counter Compare A hardware.
void PWM_setDigitalCompareFilterWindow(PWM_Handle pwmHandle, const uint16_t window)
Sets the pulse width modulation (PWM) digital compare filter offset.
volatile uint16_t TBPHSHR
Extension for the HRPWM Phase Register.
volatile uint16_t ETCLR
Event trigger clear.
void PWM_setLoadMode_CmpA(PWM_Handle pwmHandle, const PWM_LoadMode_e loadMode)
Sets the pulse width modulation (PWM) load mode for CMPA.
static uint16_t PWM_getPeriod(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) period value.
PWM_PeriodLoad_e
Enumeration to define the pulse width modulation (PWM) period load options.
void PWM_setRunMode(PWM_Handle pwmHandle, const PWM_RunMode_e runMode)
Sets the pulse width modulation (PWM) run mode.
void PWM_disableSocAPulse(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) start of conversion (SOC) B pulse generation.
volatile uint16_t TZEINT
Trip zone interrupt enable.
volatile uint16_t DBRED
Dead-band rising edge delay.
uint16_t PWM_getSocBCount(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) start of conversion (SOC) B count.
volatile uint16_t TBPHS
Time-Base Phase Register.
PWM_DigitalCompare_PulseSel_e
Enumeration to define the pulse width modulation (PWM) digital compare blanking pulse select...
void PWM_setPeriodLoad(PWM_Handle pwmHandle, const PWM_PeriodLoad_e periodLoad)
Sets the pulse width modulation (PWM) period load mode.
void PWM_setTripZoneState_TZA(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
Sets the pulse width modulation (PWM) trip zone state for Output A (TZA)
PWM_ChoppingDutyCycle_e
Enumeration to define the pulse width modulation (PWM) chopping clock duty cycles.
volatile uint16_t DBFED
Dead-band falling edge delay.
volatile uint16_t CMPAHRM
Extension of HRPWM Counter-Compare A mirror Register.
volatile uint16_t AQCTLB
Action-Qualifier Control Register for Output B (EPWMxB)
PWM_LoadMode_e
Enumeration to define the pulse width modulation (PWM) load modes.
void PWM_setTripZoneDCEventSelect_DCBEVT1(PWM_Handle pwmHandle, const PWM_TripZoneDCEventSel_e tripZoneEvent)
Sets the pulse width modulation (PWM) trip zone digital compare event select for Digital Compare Outp...
PWM_ShadowMode_e
Enumeration to define the pulse width modulation (PWM) shadow modes.
volatile uint16_t DCFOFFSETCNT
Digital Compare Filter Offset Counter.
#define PWM_ETCLR_SOCB_BITS
Defines the location of the SOCB bits in the ETCLR register.
PWM_HrControlMode_e
Enumeration to define the pulse width modulation (PWM) high resolution control mode options...
PWM_CounterMode_e
Enumeration to define the pulse width modulation (PWM) counter modes.
void PWM_enableHrPeriod(PWM_Handle pwmHandle)
Enables high resolution period control.
void PWM_setActionQualContSWForce_PwmA(PWM_Handle pwmHandle, const PWM_ActionQualContSWForce_e actionQualContSWForce)
Sets the pulse width modulation (PWM) object Continuous Software Force action for PWM A...
void PWM_setTripZoneState_DCAEVT1(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
Sets the pulse width modulation (PWM) trip zone state for Digital Compare Output A Event 1 (DCAEVT1) ...
void PWM_setHrShadowMode(PWM_Handle pwmHandle, const PWM_HrShadowMode_e shadowMode)
Set the High Resolution Shadow Load Mode.
void PWM_setDeadBandRisingEdgeDelay(PWM_Handle pwmHandle, const uint16_t delay)
Sets the pulse width modulation (PWM) deadband rising edge delay.
volatile uint16_t AQSFRC
Action qual SW force.
void PWM_setCount(PWM_Handle pwmHandle, const uint16_t count)
Sets the pulse width modulation (PWM) count.
void PWM_setLoadMode_CmpB(PWM_Handle pwmHandle, const PWM_LoadMode_e loadMode)
Sets the pulse width modulation (PWM) load mode for CMPB.
void PWM_enableDigitalCompareBlankingWindow(PWM_Handle pwmHandle)
Enables the pulse width modulation (PWM) digital compare blanking window.
volatile uint16_t CMPCTL
Counter-Compare Control Register.
void PWM_setDigitalCompareInput(PWM_Handle pwmHandle, const PWM_DigitalCompare_Input_e input, const PWM_DigitalCompare_InputSel_e inputSel)
Sets the pulse width modulation (PWM) digital compare input.
PWM_DeadBandPolarity_e
Enumeration to define the pulse width modulation (PWM) deadband polarity.
void PWM_setTripZoneState_TZB(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
Sets the pulse width modulation (PWM) trip zone state for Output B (TZB)
void PWM_setSyncMode(PWM_Handle pwmHandle, const PWM_SyncMode_e syncMode)
Sets the pulse width modulation (PWM) sync mode.
PWM_ShadowStatus_e
Enumeration to define the pulse width modulation (PWM) shadow status options.
void PWM_setActionQual_Period_PwmA(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM A when the counter equals the period...
void PWM_disableDigitalCompareBlankingWindowInversion(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) digital compare blanking window inversion.
Compare H = Don't Care, Compare L = High.
void PWM_setDigitalCompareBlankingPulse(PWM_Handle pwmHandle, const PWM_DigitalCompare_PulseSel_e pulseSelect)
Sets the pulse width modulation (PWM) digital compare blanking pulse.
struct _PWM_Obj_ * PWM_Handle
Defines the pulse width modulation (PWM) handle.
PWM_TripZoneFlag_e
Enumeration to define the pulse width modulation (PWM) trip zone states.
void PWM_enableSocBPulse(PWM_Handle pwmHandle)
Enables the pulse width modulation (PWM) start of conversion (SOC) B pulse generation.
volatile uint16_t TZCTL
Trip zone control.
static void PWM_clearSocAFlag(PWM_Handle pwmHandle)
Clears the pulse width modulation (PWM) start of conversion (SOC) A flag.
volatile uint16_t PCCTL
PWM chopper control.
void PWM_setHrEdgeMode(PWM_Handle pwmHandle, const PWM_HrEdgeMode_e edgeMode)
Set the High Resolution Edge Mode.
void PWM_setShadowMode_CmpB(PWM_Handle pwmHandle, const PWM_ShadowMode_e shadowMode)
Sets the pulse width modulation (PWM) shadow mode for CMPB.
static uint16_t PWM_get_CmpB(PWM_Handle pwmHandle)
Gets the value of the Counter Compare B hardware.
volatile uint16_t rsvd_3
Reserved.
void PWM_setActionQual_CntDown_CmpB_PwmA(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM A when the counter equals CMPB and the co...
void PWM_disableDeadBandHalfCycle(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) deadband half cycle clocking.
uint16_t PWM_getSocACount(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) start of conversion (SOC) A count.
void PWM_clearTripZone(PWM_Handle pwmHandle, const PWM_TripZoneFlag_e tripZoneFlag)
Clears the trip zone (TZ) flag specified.
PWM_HrShadowMode_e
Enumeration to define the pulse width modulation (PWM) high resolution shadow load mode options...
void PWM_disableDeadBand(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) deadband.
volatile uint16_t HRPCTL
High Resolution Period Control.
volatile uint16_t HRMSTEP
HRPWM MEP Step Register.
volatile uint16_t ETFRC
Event trigger force.
void PWM_setDigitalCompareAEvent2(PWM_Handle pwmHandle, const bool selectFilter, const bool disableSync)
Sets the pulse width modulation (PWM) digital compare A event 2 source parameters.
void PWM_disableSocBPulse(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) start of conversion (SOC) B pulse generation.
void PWM_setChoppingDutyCycle(PWM_Handle pwmHandle, const PWM_ChoppingDutyCycle_e dutyCycle)
Sets the pulse width modulation (PWM) chopping clock duty cycle.
Digital Compare A Event 1 Trip Zone flag.
void PWM_setSocBPulseSrc(PWM_Handle pwmHandle, const PWM_SocPulseSrc_e pulseSrc)
Sets the pulse width modulation (PWM) start of conversion (SOC) B interrupt pulse source...
volatile uint16_t TBPRDHRM
Time-Base Period High Resolution mirror Register.
static void PWM_clearOneShotTrip(PWM_Handle pwmHandle)
Clears the pulse width modulation (PWM) one shot trip.
volatile uint16_t rsvd_2[4]
Reserved.
void PWM_setDigitalCompareFilterOffset(PWM_Handle pwmHandle, const uint16_t offset)
Sets the pulse width modulation (PWM) digital compare filter offset.
void PWM_enableHrPhaseSync(PWM_Handle pwmHandle)
Enables high resolution phase synchronization.
void PWM_setActionQual_Period_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM B when the counter equals the period...
volatile uint16_t TZCLR
Trip zone clear.
volatile uint16_t DCBCTL
Digital Compare B Control.
void PWM_setDigitalCompareAEvent1(PWM_Handle pwmHandle, const bool selectFilter, const bool disableSync, const bool enableSoc, const bool generateSync)
Sets the pulse width modulation (PWM) digital compare A event 1 source parameters.
void PWM_disableCounterLoad(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) counter loading from the phase register.
#define ENABLE_PROTECTED_REGISTER_WRITE_MODE
Define to allow protected register writes.
static uint16_t PWM_getCmpAHr(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) data value from the Counter Compare A Hr hardware.
volatile uint16_t HRCNFG
HRPWM Config Reg.
PWM_SyncMode_e
Enumeration to define the pulse width modulation (PWM) sync modes.
volatile uint16_t DCACTL
Digital Compare A Control.
void PWM_disableChopping(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) chopping.
void PWM_setTripZoneState_DCBEVT2(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
Sets the pulse width modulation (PWM) trip zone state for Digital Compare Output B Event 2 (DCBEVT1) ...
void PWM_setActionQual_Zero_PwmA(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM A when the counter equals the zero...
PWM_DigitalCompare_InputSel_e
Enumeration to define the pulse width modulation (PWM) digital compare input choices.
volatile uint16_t ETPS
Event trigger pre-scaler.
PWM_ActionQualContSWForce_e
Enumeration to define the pulse width modulation (PWM) Action-qualifier Continuous Software Force...
void PWM_enableTripZoneInt(PWM_Handle pwmHandle, const PWM_TripZoneFlag_e interruptSource)
Enables the pulse width modulation (PWM) trip zones interrupts.
void PWM_setHighSpeedClkDiv(PWM_Handle pwmHandle, const PWM_HspClkDiv_e clkDiv)
Sets the pulse width modulation (PWM) high speed clock divisor.
void PWM_setDeadBandInputMode(PWM_Handle pwmHandle, const PWM_DeadBandInputMode_e inputMode)
Sets the pulse width modulation (PWM) deadband input mode.
Defines the pulse width modulation (PWM) object.
volatile uint16_t DCTRIPSEL
Digital Compare Trip Select.
void PWM_setTripZoneState_DCAEVT2(PWM_Handle pwmHandle, const PWM_TripZoneState_e tripZoneState)
Sets the pulse width modulation (PWM) trip zone state for Digital Compare Output A Event 2 (DCAEVT1) ...
volatile uint16_t ETSEL
Event trigger selection.
void PWM_enableCounterLoad(PWM_Handle pwmHandle)
Enables the pulse width modulation (PWM) counter loading from the phase register. ...
void PWM_setTripZoneDCEventSelect_DCBEVT2(PWM_Handle pwmHandle, const PWM_TripZoneDCEventSel_e tripZoneEvent)
Sets the pulse width modulation (PWM) trip zone digital compare event select for Digital Compare Outp...
void PWM_enableAutoConvert(PWM_Handle pwmHandle)
Enables auto conversion of delay line value.
PWM_Handle PWM_init(void *pMemory, const size_t numBytes)
Initializes the pulse width modulation (PWM) object handle.
Compare H = High, Compare L = Don't Care.
void PWM_enableSocAPulse(PWM_Handle pwmHandle)
Enables the pulse width modulation (PWM) start of conversion (SOC) A pulse generation.
PWM_TripZoneState_e
Enumeration to define the pulse width modulation (PWM) trip zone states.
PWM_IntMode_e
Enumeration to define the pulse width modulation (PWM) interrupt generation modes.
void PWM_setActionQual_CntDown_CmpB_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM B when the counter equals CMPB and the co...
#define PWM_TZFRC_OST_BITS
Defines the location of the OST bits in the TZFRC register.
volatile uint16_t TZDCSEL
Trip zone digital comparator select.
void PWM_setChoppingPulseWidth(PWM_Handle pwmHandle, const PWM_ChoppingPulseWidth_e pulseWidth)
Sets the pulse width modulation (PWM) chopping clock pulse width.
void PWM_setHrControlMode(PWM_Handle pwmHandle, const PWM_HrControlMode_e controlMode)
Set the High Resolution Control Mode.
void PWM_setPhase(PWM_Handle pwmHandle, const uint16_t phase)
Sets the pulse width modulation (PWM) phase.
Compare H = Low, Compare L = Don't Care.
PWM_ChoppingPulseWidth_e
Enumeration to define the pulse width modulation (PWM) chopping clock pulse widths.
void PWM_setDeadBandOutputMode(PWM_Handle pwmHandle, const PWM_DeadBandOutputMode_e outputMode)
Sets the pulse width modulation (PWM) deadband output mode.
#define PWM_TBCTL_SWFSYNC_BITS
Defines the location of the SWFSYNC bits in the TBCTL register.
PWM_DeadBandInputMode_e
Enumeration to define the pulse width modulation (PWM) deadband options.
volatile uint16_t DBCTL
Dead-band control.
void PWM_setTripZoneDCEventSelect_DCAEVT1(PWM_Handle pwmHandle, const PWM_TripZoneDCEventSel_e tripZoneEvent)
Sets the pulse width modulation (PWM) trip zone digital compare event select for Digital Compare Outp...
PWM_PhaseDir_e
Enumeration to define the pulse width modulation (PWM) phase direction modes.
PWM_RunMode_e
Enumeration to define the pulse width modulation (PWM) run modes.
void PWM_disableHrPhaseSync(PWM_Handle pwmHandle)
Disables high resolution phase synchronization.
volatile uint16_t DCFCTL
Digital Compare Filter Control.
static void PWM_clearSocBFlag(PWM_Handle pwmHandle)
Clears the pulse width modulation (PWM) start of conversion (SOC) B flag.
void PWM_setChoppingClkFreq(PWM_Handle pwmHandle, const PWM_ChoppingClkFreq_e clkFreq)
Sets the pulse width modulation (PWM) chopping clock frequency.
void PWM_setTripZoneDCEventSelect_DCAEVT2(PWM_Handle pwmHandle, const PWM_TripZoneDCEventSel_e tripZoneEvent)
Sets the pulse width modulation (PWM) trip zone digital compare event select for Digital Compare Outp...
static uint16_t PWM_getCmpB(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) data value from the Counter Compare B hardware.
volatile uint16_t TZSEL
Trip zone select.
PWM_IntPeriod_e
Enumeration to define the pulse width modulation (PWM) interrupt period options.
void PWM_enableInt(PWM_Handle pwmHandle)
Enables the pulse width modulation (PWM) interrupt.
void PWM_disableAutoConvert(PWM_Handle pwmHandle)
Disables auto conversion of delay line value.
static void PWM_setOneShotTrip(PWM_Handle pwmHandle)
Sets the pulse width modulation (PWM) one shot trip.
volatile uint16_t AQCSFRC
Action qualifier continuous SW force.
PWM_TripZoneDCEventSel_e
Enumeration to define the pulse width modulation (PWM) trip zone event selections.
volatile uint16_t rsvd_5[2]
Reserved.
Contains public interface to various functions related to the central processing unit (CPU) object...
PWM_SocPeriod_e
Enumeration to define the pulse width modulation (PWM) start of conversion (SOC) period options...
volatile uint16_t TBPRD
Time-Base Period register set.
void PWM_setSocAPulseSrc(PWM_Handle pwmHandle, const PWM_SocPulseSrc_e pulseSrc)
Sets the pulse width modulation (PWM) start of conversion (SOC) A interrupt pulse source...
volatile uint16_t TBPRDM
Time-Base Period mirror register.
static void PWM_forceSync(PWM_Handle pwmHandle)
Force Synchronization.
volatile uint16_t CMPA
Counter-Compare A Register.
PWM_DigitalCompare_FilterSrc_e
Enumeration to define the pulse width modulation (PWM) digital compare filter sources.
volatile uint16_t TZFRC
Trip zone force interrupt.
void PWM_setSocBPeriod(PWM_Handle pwmHandle, const PWM_SocPeriod_e intPeriod)
Sets the pulse width modulation (PWM) start of conversion (SOC) B interrupt period.
void PWM_enableDigitalCompareBlankingWindowInversion(PWM_Handle pwmHandle)
Enables the pulse width modulation (PWM) digital compare blanking window inversion.
void PWM_disableTripZoneInt(PWM_Handle pwmHandle, const PWM_TripZoneFlag_e interruptSource)
Disables the pulse width modulation (PWM) trip zones interrupts.
PWM_SocPulseSrc_e
Enumeration to define the pulse width modulation (PWM) start of conversion (SOC) sources.
void PWM_setCounterMode(PWM_Handle pwmHandle, const PWM_CounterMode_e counterMode)
Sets the pulse width modulation (PWM) counter mode.
volatile uint16_t DCFWINDOW
Digital Compare Filter Window.
void PWM_setPeriodHr(PWM_Handle pwmHandle, const uint16_t period)
Sets the pulse width modulation (PWM) high resolution period.
#define PWM_ETCLR_INT_BITS
Defines the location of the ETCR bits in the ETCLR register.
void PWM_setActionQualContSWForce_PwmB(PWM_Handle pwmHandle, const PWM_ActionQualContSWForce_e actionQualContSWForce)
Sets the pulse width modulation (PWM) object Continuous Software Force action for PWM B...
void PWM_setDeadBandFallingEdgeDelay(PWM_Handle pwmHandle, const uint16_t delay)
Sets the pulse width modulation (PWM) deadband falling edge delay.
static void PWM_setCmpA(PWM_Handle pwmHandle, const uint16_t pwmData)
Writes the pulse width modulation (PWM) data value to the Counter Compare A hardware.
Compare H = Don't Care, Compare L = Low.
static uint16_t PWM_get_CmpAM(PWM_Handle pwmHandle)
Gets the value of the Counter Compare A Mirror Register.
void PWM_disableInt(PWM_Handle pwmHandle)
Disables the pulse width modulation (PWM) interrupt.
static void PWM_setCmpAHr(PWM_Handle pwmHandle, const uint16_t pwmData)
Writes the pulse width modulation (PWM) data value to the Counter Compare A Hr hardware.
static uint16_t PWM_get_CmpA(PWM_Handle pwmHandle)
Gets the value of the Counter Compare A hardware.
volatile uint16_t TBSTS
Time-Base Status Register.
void PWM_setDigitalCompareBEvent1(PWM_Handle pwmHandle, const bool selectFilter, const bool disableSync, const bool enableSoc, const bool generateSync)
Sets the pulse width modulation (PWM) digital compare B event 1 source parameters.
void PWM_setPhaseDir(PWM_Handle pwmHandle, const PWM_PhaseDir_e phaseDir)
Sets the pulse width modulation (PWM) phase direction.
Digital Compare B Event 1 Trip Zone flag.
void PWM_setActionQual_CntDown_CmpA_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM B when the counter equals CMPA and the co...
void PWM_enableChopping(PWM_Handle pwmHandle)
Enables the pulse width modulation (PWM) chopping.
void PWM_disableHrPeriod(PWM_Handle pwmHandle)
Disables high resolution period control.
void PWM_setSocAPeriod(PWM_Handle pwmHandle, const PWM_SocPeriod_e intPeriod)
Sets the pulse width modulation (PWM) start of conversion (SOC) A interrupt period.
void PWM_setIntPeriod(PWM_Handle pwmHandle, const PWM_IntPeriod_e intPeriod)
Sets the pulse width modulation (PWM) interrupt period.
void PWM_setActionQual_CntUp_CmpB_PwmA(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM A when the counter equals CMPB and the co...
void PWM_setActionQual_CntUp_CmpB_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM B when the counter equals CMPB and the co...
void PWM_incrementDeadBandFallingEdgeDelay(PWM_Handle pwmHandle)
Increment the dead band falling edge delay.
volatile uint16_t TBPRDHR
Time-Base Period High Resolution Register.
volatile uint16_t TBCTR
Time-Base Counter.
void PWM_setActionQual_Zero_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM B when the counter equals the zero...
void PWM_setActionQual_CntUp_CmpA_PwmA(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM A when the counter equals CMPA and the co...
volatile uint16_t CMPAHR
Extension of HRPWM Counter-Compare A Register.
void PWM_incrementDeadBandRisingEdgeDelay(PWM_Handle pwmHandle)
Increment the dead band rising edge delay.
PWM_ChoppingClkFreq_e
Enumeration to define the pulse width modulation (PWM) chopping clock frequencies.
PWM_HspClkDiv_e
Enumeration to define the pulse width modulation (PWM) high speed clock divide options.
static void PWM_clearIntFlag(PWM_Handle pwmHandle)
Clears the pulse width modulation (PWM) interrupt flag.
void PWM_setActionQual_CntUp_CmpA_PwmB(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM B when the counter equals CMPA and the co...
PWM_DigitalCompare_Input_e
Enumeration to define the pulse width modulation (PWM) digital compare inputs.
void PWM_setDigitalCompareFilterSource(PWM_Handle pwmHandle, const PWM_DigitalCompare_FilterSrc_e input)
Sets the pulse width modulation (PWM) digital compare filter source.
void PWM_setSwSync(PWM_Handle pwmHandle)
Sets the pulse width modulation (PWM) software sync.
void PWM_setShadowMode_CmpA(PWM_Handle pwmHandle, const PWM_ShadowMode_e shadowMode)
Sets the pulse width modulation (PWM) shadow mode for CMPA.
Digital Compare B Event 2 Trip Zone flag.
volatile uint16_t TZFLG
Trip zone interrupt flags.
Compare H = Low, Compare L = High.
volatile uint16_t DCFOFFSET
Digital Compare Filter Offset.
#define PWM_TZCLR_OST_BITS
Defines the location of the OST bits in the TXCLR register.
void PWM_setPeriod(PWM_Handle pwmHandle, const uint16_t period)
Sets the pulse width modulation (PWM) period.
void PWM_enableTripZoneSrc(PWM_Handle pwmHandle, const PWM_TripZoneSrc_e src)
Enable the pulse width modulation (PWM) trip zone source.
void PWM_enableDeadBandHalfCycle(PWM_Handle pwmHandle)
Enables the pulse width modulation (PWM) deadband half cycle clocking.
volatile uint16_t HRPWR
HRPWM Power Register.
PWM_Number_e
Enumeration to define the pulse width modulation (PWM) numbers.
void PWM_disableTripZoneSrc(PWM_Handle pwmHandle, const PWM_TripZoneSrc_e src)
Disable the pulse width modulation (PWM) trip zone source.
PWM_HrEdgeMode_e
Enumeration to define the pulse width modulation (PWM) high resolution edge mode options.
volatile uint16_t DCCAP
Digital Compare Filter Counter Capture.
static void PWM_setCmpB(PWM_Handle pwmHandle, const uint16_t pwmData)
Writes the pulse width modulation (PWM) data value to the Counter Compare B hardware.
volatile uint16_t CMPAM
Counter-Compare A mirror Register.
volatile uint16_t CMPB
Counter-Compare B Register.
void PWM_setActionQual_CntDown_CmpA_PwmA(PWM_Handle pwmHandle, const PWM_ActionQual_e actionQual)
Sets the pulse width modulation (PWM) object action for PWM A when the counter equals CMPA and the co...
Cycle by cycle Trip Zone flag.
uint16_t PWM_getIntCount(PWM_Handle pwmHandle)
Gets the pulse width modulation (PWM) interrupt event count.
#define PWM_ETCLR_SOCA_BITS
Defines the location of the SOCA bits in the ETCLR register.
PWM_TripZoneSrc_e
Enumeration to define the pulse width modulation (PWM) trip zone sources.
static void PWM_write_CmpB(PWM_Handle pwmHandle, const uint16_t pwmData)
Writes the pulse width modulation (PWM) data value to the Counter Compare B hardware.
void PWM_setDeadBandPolarity(PWM_Handle pwmHandle, const PWM_DeadBandPolarity_e polarity)
Sets the pulse width modulation (PWM) deadband polarity.