Pulse Width Modulator (PWM)
Parameters:
ui32Base is the base address of the PWM module.
ui32Gen is the PWM generator whose fault configuration is being set. Must be one of
PWM_GEN_0, PWM_GEN_1, PWM_GEN_2, or PWM_GEN_3.
ui32MinFaultPeriod is the minimum fault active period expressed in PWM clock cycles.
ui32FaultSenses indicates which sense of each FAULT input should be considered the “as-
serted” state. Valid values are logical OR combinations of PWM_FAULTn_SENSE_HIGH
and PWM_FAULTn_SENSE_LOW.
Description:
This function sets the minimum fault period for a given generator along with the sense
of each of the 4 possible fault inputs. The minimum fault period is expressed in
PWM clock cycles and takes effect only if ROM_PWMGenConfigure() is called with flag
PWM_GEN_MODE_FAULT_PER set in the ui32Config parameter. When a fault input is as-
serted, the minimum fault period timer ensures that it remains asserted for at least the number
of clock cycles specified.
Note:
This function is only available on devices supporting extended PWM fault handling.
Returns:
None.
15.2.1.10 ROM_PWMGenFaultStatus
Returns the current state of the fault triggers for a given PWM generator.
Prototype:
uint32_t
ROM_PWMGenFaultStatus(uint32_t ui32Base,
uint32_t ui32Gen,
uint32_t ui32Group)
ROM Location:
ROM_APITABLE is an array of pointers located at 0x0100.0010.
ROM_PWMTABLE is an array of pointers located at ROM_APITABLE[8].
ROM_PWMGenFaultStatus is a function pointer located at ROM_PWMTABLE[27].
Parameters:
ui32Base is the base address of the PWM module.
ui32Gen is the PWM generator whose fault trigger states are being queried. Must be one of
PWM_GEN_0, PWM_GEN_1, PWM_GEN_2, or PWM_GEN_3.
ui32Group indicates the subset of faults that are being queried. This must be
PWM_FAULT_GROUP_0 or PWM_FAULT_GROUP_1.
Description:
This function allows an application to query the current state of each of the fault trig-
ger inputs to a given PWM generator. The current state of each fault trigger in-
put is returned unless ROM_PWMGenConfigure() has previously been called with flag
PWM_GEN_MODE_LATCH_FAULT in the ui32Config parameter in which case the returned
status is the latched fault trigger status.
April 8, 2013 161