Skip to content
Snippets Groups Projects
Commit 35a55d57 authored by Stefan Brüns's avatar Stefan Brüns Committed by Scott Lahteine
Browse files

SOFT_PWM: Implement dithering if SOFT_PWM_SCALE is 1 or more


If dithering is enabled, the remainder of the soft_pwm_X duty value at
turnoff time is added to the next cycle. If e.g. the duty is set to 9 and
SCALE is set to 2, the PWM will be active for 8 counts for 3 cycles and
12 counts on each fourth cycle, i.e. the average is 9 cycles.

This compensates the resolution loss at higher scales and allows running
fans with SOFT_PWM with significantly reduced noise.

Signed-off-by: default avatarStefan Brüns <stefan.bruens@rwth-aachen.de>
parent 2aed66a9
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment