GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
PWM(8) FreeBSD System Manager's Manual PWM(8)

pwm
configure PWM (Pulse Width Modulation) hardware

pwm [-f device] -C

pwm [-f device] [-D | -E] [-I] [-p period] [-d duty]

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:

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.
Show the configuration of the PWM channel.
Disable the PWM channel.
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.
Enable the PWM channel.
period
Configure the period (in nanoseconds) of the PWM channel.
Invert PWM signal polarity

  • Show the configuration of the PWM channel:
    pwm -f /dev/pwm/pwmc0.1 -C
        
  • Configure a 50000 ns period and a 25000 ns duty cycle and enable the channel:
    pwm -f pwmc1.1 -E -p 50000 -d 25000
        
  • Configure a 50% duty cycle on the device and channel which were configured in pwmc(4) to have the label backlight:
    pwm -f backlight -d 50%
        

pwm(9), pwmbus(9)

The pwm utility appeared in FreeBSD 13.0.

The pwm utility and this manual page were written by Emmanuel Vadot <manu@FreeBSD.org>.
June 17, 2019 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 8 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.