From 9051da0184cf839037f1370c729b27bf065b9c95 Mon Sep 17 00:00:00 2001
From: tao_z <tzj0429@163.com>
Date: Sat, 10 Jul 2021 22:06:34 +0800
Subject: [PATCH] 马达可以转动

---
 USR/SRC/pwm.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/USR/SRC/pwm.c b/USR/SRC/pwm.c
index e33156e..d51e789 100644
--- a/USR/SRC/pwm.c
+++ b/USR/SRC/pwm.c
@@ -61,21 +61,21 @@
     timercontralcfg.period = PERIOD_CMP;                 // set period(counter value 0~2^15)
     timer_init(TIMER0, &timercontralcfg);
 
-    timeroutcfg[0].ocpolarity = TIMER_OC_POLARITY_HIGH; //channel output polarity is high
+    timeroutcfg[0].ocpolarity = TIMER_OC_POLARITY_HIGH; //channel output polarity is low
     timeroutcfg[0].ocnpolarity = TIMER_OCN_POLARITY_HIGH;
     timeroutcfg[0].outputstate = TIMER_CCX_ENABLE;    //channel enable
     timeroutcfg[0].outputnstate = TIMER_CCXN_DISABLE; //channel complementary DISABLE
     timeroutcfg[0].ocidlestate = TIMER_OC_IDLE_STATE_LOW;
     timeroutcfg[0].ocnidlestate = TIMER_OCN_IDLE_STATE_LOW;
 
-    timeroutcfg[1].ocpolarity = TIMER_OC_POLARITY_HIGH; //channel output polarity is high
+    timeroutcfg[1].ocpolarity = TIMER_OC_POLARITY_HIGH; //channel output polarity is LOW
     timeroutcfg[1].ocnpolarity = TIMER_OCN_POLARITY_HIGH;
     timeroutcfg[1].outputstate = TIMER_CCX_ENABLE;    //channel enable
     timeroutcfg[1].outputnstate = TIMER_CCXN_DISABLE; //channel complementary  DISABLE
     timeroutcfg[1].ocidlestate = TIMER_OC_IDLE_STATE_LOW;
     timeroutcfg[1].ocnidlestate = TIMER_OCN_IDLE_STATE_LOW;
 
-    timeroutcfg[2].ocpolarity = TIMER_OC_POLARITY_HIGH; //channel output polarity is high
+    timeroutcfg[2].ocpolarity = TIMER_OC_POLARITY_HIGH; //channel output polarity is LOW
     timeroutcfg[2].ocnpolarity = TIMER_OCN_POLARITY_HIGH;
     timeroutcfg[2].outputstate = TIMER_CCX_ENABLE;    //channel enable
     timeroutcfg[2].outputnstate = TIMER_CCXN_DISABLE; //channel complementary  DISABLE

--
Gitblit v1.8.0