mirror of
https://github.com/sipeed/sipeed_wiki.git
synced 2026-09-11 00:22:49 -05:00
Merge pull request #794 from Pairman/patch-1
[LPi4A / PWM]fix factual errors
This commit is contained in:
@@ -71,17 +71,23 @@ Take PWM1 which is connected to the cooling fan as an example, you can get the f
|
||||
cat /sys/class/hwmon/hwmon0/pwm1
|
||||
```
|
||||
|
||||
The PWM speed value ranges from 0 to 255, where a higher value represents a higher fan speed. You can write ```0``` to the PWM enable control to disable automatic speed regulation, and manually set the fan speed (e.g., 255):
|
||||
The PWM speed value ranges from 0 to 255, where a higher value represents a higher fan speed. You can write ```1``` to the PWM enable control for manual speed regulation, and set the fan speed (e.g., 255):
|
||||
|
||||
```
|
||||
echo 0 > /sys/class/hwmon/hwmon0/pwm1_enable
|
||||
echo 0 > /sys/class/hwmon/hwmon0/pwm1
|
||||
echo 255 > /sys/class/hwmon/hwmon0/pwm1
|
||||
```
|
||||
|
||||
Or you can enable automatic speed regulation with the following code:
|
||||
You can enable automatic speed regulation with the following code:
|
||||
|
||||
```bash
|
||||
echo 1 > /sys/class/hwmon/hwmon0/pwm1_enable
|
||||
echo 2 > /sys/class/hwmon/hwmon0/pwm1_enable
|
||||
```
|
||||
|
||||
Or stop the fan completely:
|
||||
|
||||
```bash
|
||||
echo 0 > /sys/class/hwmon/hwmon0/pwm1_enable
|
||||
```
|
||||
|
||||
## GPIO
|
||||
|
||||
@@ -71,17 +71,23 @@ light-lpi4a-ddr2G.dtb #history dtb
|
||||
cat /sys/class/hwmon/hwmon0/pwm1
|
||||
```
|
||||
|
||||
风扇的PWM转速值范围在0到255之间,值越大风扇转速越大。你可以向PWM使能写入```0```来关闭自动调速,并手动设置转速(如255):
|
||||
风扇的PWM转速值范围在0到255之间,值越大风扇转速越大。你可以向PWM使能写入```1```来启用手动调速,并设置转速(如255):
|
||||
|
||||
```
|
||||
echo 0 > /sys/class/hwmon/hwmon0/pwm1_enable
|
||||
echo 0 > /sys/class/hwmon/hwmon0/pwm1
|
||||
echo 255 > /sys/class/hwmon/hwmon0/pwm1
|
||||
```
|
||||
|
||||
使用以下命令可以恢复自动调速:
|
||||
|
||||
```bash
|
||||
echo 1 > /sys/class/hwmon/hwmon0/pwm1_enable
|
||||
echo 2 > /sys/class/hwmon/hwmon0/pwm1_enable
|
||||
```
|
||||
|
||||
或是完全禁用风扇:
|
||||
|
||||
```bash
|
||||
echo 0 > /sys/class/hwmon/hwmon0/pwm1_enable
|
||||
```
|
||||
|
||||
## GPIO
|
||||
|
||||
Reference in New Issue
Block a user