From 82e38738a4d532cc3d56cbf80c1a4093f23cdd6a Mon Sep 17 00:00:00 2001
From: tao_z <tzj0429@163.com>
Date: Wed, 14 Jul 2021 07:01:42 +0800
Subject: [PATCH] 调整时钟64MHz。 RTT任务增加马达开启和关闭功能

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

diff --git a/USR/SRC/gd32e23x_it.c b/USR/SRC/gd32e23x_it.c
index 2db822c..cb0933d 100644
--- a/USR/SRC/gd32e23x_it.c
+++ b/USR/SRC/gd32e23x_it.c
@@ -36,6 +36,7 @@
 
 #include "gd32e23x_it.h"
 #include "motor.h"
+#include "pwm.h"
 #include "os_task.h"
 
 /*!
@@ -156,9 +157,8 @@
     if (RESET != exti_interrupt_flag_get(EXTI_4 | EXTI_5 | EXTI_15))
     {
         HAL_HallExti_TriggerCallback();
+        exti_interrupt_flag_clear(EXTI_4 | EXTI_5 | EXTI_15);
     }
-
-    exti_interrupt_flag_clear(EXTI_4 | EXTI_5 | EXTI_15);
 }
 
 /*!
@@ -171,7 +171,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