BCM283X_PWM(4)
okay so bestie, welcome to BCM283X_PWM(4), straight out of the arm Kernel Interfaces Manual β it's the Raspberry Pi PWM driver page and it's lowkey iconic. π
πΈ NAME πΈ
bcm283x_pwm β driver for Raspberry Pi 2/3 PWM, periodt. β¨
π¦ SYNOPSIS π¦
kldload bcm283x_clkman
kldload bcm283x_pwm
β¨ DESCRIPTION β¨
The bcm283x_pwm driver gives you access to the PWM engine on GPIO12 of Raspberry Pi 2 and 3 hardware. no cap, that's the whole vibe. π
The PWM hardware is controlled via the sysctl(8) interface:
dev.pwm.0.mode: 1
dev.pwm.0.mode2: 1
dev.pwm.0.freq: 125000000
dev.pwm.0.ratio: 2500
dev.pwm.0.ratio2: 2500
dev.pwm.0.period: 10000
dev.pwm.0.period2: 10000
dev.pwm.0.pwm_freq: 12500
dev.pwm.0.pwm_freq2: 12500
dev.pwm.0.mode,dev.pwm.0.mode2β PWM Mode for channels 1 and 2. Three modes exist,0=off,1=PWM,2=N/M. The N/M mode is a first order delta-sigma mode, which makes a quite handy DAC output with a trivial RC lowpass filter. π«Άdev.pwm.0.freqβ The input frequency to the PWM hardware in Hz. Applies to both channels 1 and 2. Minimum frequency is123 kHz, maximum frequency is125 MHz. βdev.pwm.0.period,dev.pwm.0.period2β The period length in cycles. In PWM mode, the output frequencies will be( dev.pwm.0.freq / dev.pwm.period )and( dev.pwm.0.freq2 / dev.pwm.0.period2 ). In N/M mode this is the'M'. πdev.pwm.0.ratio,dev.pwm.0.ratio2β The"on"period in cycles for PWM channels 1 and 2. In PWM mode, to get a25%dutycycle, set this to25%ofdev.pwm.0.periodordev.pwm.0.period2, as appropriate. In N/M mode this is the'N'. πdev.pwm.0.pwm_freq,dev.pwm.0.pwm_freq2β The calculated PWM output frequencies in PWM mode, for channels 1 and 2. π
π NOTES π
Currently the bcm283x_pwm driver ignores the status="disabled" flag in the DTB, assuming that if you load the driver, you want it to work. like, it said "disabled" and the driver said "not me." π
π SEE ALSO π
sysctl(8) β go peek, bestie. π¦
β HISTORY β
The bcm283x_pwm driver first appeared in FreeBSD 12.0. iconic behavior. π
π AUTHORS π
The bcm283x_pwm driver and this manual page were written by Poul-Henning Kamp <phk@FreeBSD.org>. π
okay bye bestie β this page's source/version is Debian, dated September 10, 2018, and it's the BCM283X_PWM(4) page. mwah ππ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- π the page's license: BSD-2-Clause
- Copyright (c) 2017 Poul-Henning Kamp <phk@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms