Browse Source

fix: pwm改频率不生效 https://gitee.com/openLuat/LuatOS/issues/I5EJ2X

chenxuuu 3 years ago
parent
commit
9f7c71e801
1 changed files with 1 additions and 0 deletions
  1. 1 0
      app/port/luat_pwm_air101.c

+ 1 - 0
app/port/luat_pwm_air101.c

@@ -203,6 +203,7 @@ int luat_pwm_setup(luat_pwm_conf_t* conf) {
 	}
 	
 	// 属于全新配置
+	tls_pwm_stop(channel);
 	ret = tls_pwm_init(channel, period, pulse, pnum);
     if(ret != WM_SUCCESS)
         return ret;