Pulse Width Modulator (PWM)
Prototype:
uint32_t
ROM_PWMPulseWidthGet(uint32_t ui32Base,
uint32_t ui32PWMOut)
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_PWMPulseWidthGet is a function pointer located at ROM_PWMTABLE[6].
Parameters:
ui32Base is the base address of the PWM module.
ui32PWMOut is the PWM output to query. Must be one of PWM_OUT_0, PWM_OUT_1,
PWM_OUT_2, PWM_OUT_3, PWM_OUT_4, PWM_OUT_5, PWM_OUT_6, or
PWM_OUT_7.
Description:
This function gets the currently programmed pulse width for the specified PWM output. If the
update of the comparator for the specified output has yet to be completed, the value returned
may not be the active pulse width. The value returned is the programmed pulse width, mea-
sured in PWM clock ticks.
Returns:
Returns the width of the pulse in PWM clock ticks.
15.2.1.27 ROM_PWMPulseWidthSet
Sets the pulse width for the specified PWM output.
Prototype:
void
ROM_PWMPulseWidthSet(uint32_t ui32Base,
uint32_t ui32PWMOut,
uint32_t ui32Width)
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_PWMPulseWidthSet is a function pointer located at ROM_PWMTABLE[0].
Parameters:
ui32Base is the base address of the PWM module.
ui32PWMOut is the PWM output to modify. Must be one of PWM_OUT_0, PWM_OUT_1,
PWM_OUT_2, PWM_OUT_3, PWM_OUT_4, PWM_OUT_5, PWM_OUT_6, or
PWM_OUT_7.
ui32Width specifies the width of the positive portion of the pulse.
Description:
This function sets the pulse width for the specified PWM output, where the pulse width is
defined as the number of PWM clock ticks.
Note:
Any subsequent calls made to this function before an update occurs will cause the previous
values to be overwritten.
172 April 8, 2013