• 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.
29.1.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.
Table below provides a summary of the interface functions in source code.
Table 29-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
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 peripheral clock of the PWM module, rather than
the local functional clock, as the local functional clock can change.
29.1.4 Driver Features
The PWM driver includes the following software and hardware support:
• Duty cycle modulation
• Varying output intervals
• Two power management modes-full on and full of
Chapter 29 Pulse-Width Modulator (PWM) Driver
i.MX 6SoloLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013
Freescale Semiconductor, Inc.
187