# [RSIC-V]Milk-V开发板测试pwm及波形输出
## 简介
## 加载pwm模块
```
[root@cvitek]/mnt/system/ko# ls
3rd cv180x_pwm.ko cv180x_vpss.ko
cfbcopyarea.ko cv180x_rgn.ko cv180x_wdt.ko
cfbfillrect.ko cv180x_rtc.ko cvi_mipi_rx.ko
cfbimgblt.ko cv180x_rtos_cmdqu.ko cvi_vc_driver.ko
cv180x_base.ko cv180x_saradc.ko cvi_wiegand.ko
cv180x_clock_cooling.ko cv180x_sys.ko cviaudio_core.ko
cv180x_dwa.ko cv180x_thermal.ko efivarfs.ko
cv180x_fast_image.ko cv180x_tpu.ko fb_ssd1306.ko
cv180x_jpeg.ko cv180x_vcodec.ko loadsystemko.sh
cv180x_mon.ko cv180x_vi.ko snsr_i2c.ko
```
```
insmod /mnt/system/ko/cv180x_pwm.ko
```
```
[root@cvitek]/sys/class/pwm# ls
pwmchip0 pwmchip12 pwmchip4 pwmchip8
```
## 例子:PWM10
### 原理图
### 修改pinmux
buildboardscv180xcv1800b_sophpi_duo_sdu-bootcvi_board_init.c
```
//PWM10
PINMUX_CONFIG(SD1_GPIO1, PWM_10);
```
## 测试
```
//pwm10,也就是pwmchip8的第三个,也就是pwmchip8/pwm2
echo 2 > /sys/class/pwm/pwmchip8/export
echo 1000000 > /sys/class/pwm/pwmchip8/pwm2/period
echo 500000 > /sys/c
lass/pwm/pwmchip8/pwm2/duty_cycle
echo 1 > /sys/class/pwm/pwmchip8/pwm2/enable
```
## 波形
审核编辑:刘清
-
PWM模块
+关注
关注
0文章
14浏览量
9436 -
RSIC-V
+关注
关注
4文章
14浏览量
6534
发布评论请先 登录
相关推荐
评论