From 945ba42f7550d5a203e43d82b43ed82dc981d9e9 Mon Sep 17 00:00:00 2001
From: tao_z <tzj0429@163.com>
Date: Wed, 30 Jun 2021 22:05:52 +0800
Subject: [PATCH] 霍尔输入中断正常,需要调试马达转动

---
 USR/SRC/gd32e23x_it.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/USR/SRC/gd32e23x_it.c b/USR/SRC/gd32e23x_it.c
index 3d538c2..85acfff 100644
--- a/USR/SRC/gd32e23x_it.c
+++ b/USR/SRC/gd32e23x_it.c
@@ -36,6 +36,8 @@
 
 #include "gd32e23x_it.h"
 #include "motor.h"
+#include "pwm.h"
+#include "os_task.h"
 
 /*!
     \brief      this function handles NMI exception
@@ -141,7 +143,7 @@
 */
 void SysTick_Handler(void)
 {
-    delay_decrement();
+    OS_TickFlag = 1;
 }
 /*!
     \brief      this function handles EXTI4-15 exception
@@ -170,7 +172,8 @@
 {
     if (SET == timer_interrupt_flag_get(TIMER2, TIMER_INT_FLAG_UP)) //time2 count up overflow
     {
-        BLDC_SpeedAndPID();
+        // BLDC_SpeedAndPID();
+        TIMER2_IRQHandler_CallBack();
         timer_interrupt_flag_clear(TIMER2, TIMER_INT_FLAG_UP);
     }
 }

--
Gitblit v1.8.0