Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
PWM(8)			FreeBSD	System Manager's Manual			PWM(8)

NAME
     pwm -- configure PWM (Pulse Width Modulation) hardware

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

DESCRIPTION
     The pwm utility can be used to configure pwm hardware.  pwm uses a
     pwmc(4) device to communicate with	the hardware.  Some PWM	hardware sup-
     ports 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 auto-
		matically 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.

EXAMPLES
     +o	 Show the configuration	of the PWM channel:

	 pwm -f	/dev/pwm/pwmc0.1 -C

     +o	 Configure a 50000 ns period and a 25000 ns duty cycle and enable the
	 channel:

	 pwm -f	pwmc1.1	-E -p 50000 -d 25000

     +o	 Configure a 50% duty cycle on the device and channel which were con-
	 figured in pwmc(4) to have the	label backlight:

	 pwm -f	backlight -d 50%

SEE ALSO
     pwm(9), pwmbus(9)

HISTORY
     The pwm utility appeared in FreeBSD 13.0.

AUTHORS
     The pwm utility and this manual page were written by Emmanuel Vadot
     <manu@FreeBSD.org>.

FreeBSD	13.0			 June 17, 2019			  FreeBSD 13.0

NAME | SYNOPSIS | DESCRIPTION | EXAMPLES | SEE ALSO | HISTORY | AUTHORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=pwm&sektion=8&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help