Pulse-Width Modulator (PWM) Driver
i.MX51 EVK Linux Reference Manual
32-2
Freescale Semiconductor
The PWM follows IP Bus protocol for interfacing with the processor core. It does not interface with any
other modules inside the device except for the clock and reset inputs from the Clock Control Module
(CCM) and interrupt signals to the processor interrupt handler. The PWM includes a single external output
signal, PMWO. The PWM includes the following internal signals:
•
Three clock inputs
•
Four interrupt lines
•
One hardware reset line
•
Four low power and debug mode signals
•
Four scan signals
•
Standard IP slave bus signals
32.2
Clocks
The clock that feeds the prescaler can be selected from:
•
High frequency clock—provided by the CCM. The PWM can be run from this clock in low power
mode.
•
Low reference clock—32 KHz low reference clock provided by the CCM. The PWM can be run
from this clock in the low power mode.
•
Global functional clock—for normal operations. In low power modes this clock can be switched
off.
The clock input source is determined by the CLKSRC field of the PWM control register. The CLKSRC
value should only be changed when the PWM is disabled.
32.3
Software Operation
The PWM device driver reduces the amount of power sent to a load by varying the width of a series of
pulses to the power source. One common and effective use of the PWM is controlling the backlight of a
QVGA panel with a variable duty cycle.
provides a summary of the interface functions in source code.
The function
pwm_config()
includes most of the configuration tasks for the PWM module, including the
clock source option, and period and duty cycle of the PWM output signal. It is recommended to select the
Table 32-1. PWM Driver Summary
Function
Description
struct pwm_device *pwm_request(int pwm_id, const char *label)
Request a PWM device
void pwm_free(struct pwm_device *pwm)
Free a PWM device
int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
Change a PWM device configuration
int pwm_enable(struct pwm_device *pwm)
Start a PWM output toggling
int pwm_disable(struct pwm_device *pwm)
Stop a PWM output toggling
Summary of Contents for i.MX51 EVK
Page 1: ...Part Number 924 76374 Rev 10 11 01 11 2010 i MX51 EVK Linux Reference Manual...
Page 14: ...i MX51 EVK Linux Reference Manual xiv Freescale Semiconductor...
Page 18: ...i MX51 EVK Linux Reference Manual xviii Freescale Semiconductor...
Page 24: ...i MX51 EVK Linux Reference Manual xxiv Freescale Semiconductor...
Page 38: ...Machine Specific Layer MSL i MX51 EVK Linux Reference Manual 2 8 Freescale Semiconductor...
Page 52: ...MC13892 Digitizer Driver i MX51 EVK Linux Reference Manual 5 4 Freescale Semiconductor...
Page 64: ...TV Encoder TVE Driver i MX51 EVK Linux Reference Manual 10 4 Freescale Semiconductor...
Page 82: ...Video for Linux Two V4L2 Driver i MX51 EVK Linux Reference Manual 12 8 Freescale Semiconductor...
Page 86: ...i MX5 Dual Display i MX51 EVK Linux Reference Manual 13 4 Freescale Semiconductor...
Page 100: ...X Windows Acceleration i MX51 EVK Linux Reference Manual 16 6 Freescale Semiconductor...
Page 118: ...Low Level Keypad Driver i MX51 EVK Linux Reference Manual 20 6 Freescale Semiconductor...
Page 134: ...Security Drivers i MX51 EVK Linux Reference Manual 22 10 Freescale Semiconductor...
Page 148: ...Inter IC I2C Driver i MX51 EVK Linux Reference Manual 24 4 Freescale Semiconductor...
Page 178: ...ARC USB Driver i MX51 EVK Linux Reference Manual 29 10 Freescale Semiconductor...
Page 194: ...OProfile i MX51 EVK Linux Reference Manual 33 6 Freescale Semiconductor...