The
pwm
utility can be used to configure pwm hardware.
pwm
uses a
pwmc(4)
device to communicate with the hardware.
Some PWM hardware supports multiple output channels within a single
controller block; each
pwmc(4)
instance controls a single PWM channel.
pwmc(4)
devices are named
/dev/pwm/pwmcX.Y,
where
X
is the controller unit number and
Y
is the channel number within that unit.
The options are as follows:
-f device
|
|
Device to operate on.
If not specified,
/dev/pwm/pwmc0.0
is used.
If an unqualified name is provided,
/dev/pwm
is automatically prepended.
|
-C
|
Show the configuration of the PWM channel.
|
-D
|
Disable the PWM channel.
|
-d duty
|
|
Configure the duty cycle (in nanoseconds or percentage) of the PWM channel.
Duty is the portion of the
period
during which the signal is asserted.
|
-E
|
Enable the PWM channel.
|
-p period
|
|
Configure the period (in nanoseconds) of the PWM channel.
|