From 0bd2d4005ad7a1980d7583b66a2420e3f6761fc8 Mon Sep 17 00:00:00 2001 From: "REASEARCHER\\18383" <1633026436@qq.com> Date: Fri, 5 Sep 2025 14:27:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hyt2/BSP/Driver/tmc2160/tmc2160.c | 2 +- Hyt2/GD32F4xx_Firmware_Library/SYSTICK/gd32f4xx_it.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Hyt2/BSP/Driver/tmc2160/tmc2160.c b/Hyt2/BSP/Driver/tmc2160/tmc2160.c index bed861c..9b36588 100644 --- a/Hyt2/BSP/Driver/tmc2160/tmc2160.c +++ b/Hyt2/BSP/Driver/tmc2160/tmc2160.c @@ -232,7 +232,7 @@ void tmc2160_init() nvic_irq_enable(TIMER4_IRQn, 2u, 3u);//配置中断优先级 - /* TIMER7 enable */ + /* TIMER4 enable */ // timer_enable(TIMER4);//使能定时器 #endif diff --git a/Hyt2/GD32F4xx_Firmware_Library/SYSTICK/gd32f4xx_it.c b/Hyt2/GD32F4xx_Firmware_Library/SYSTICK/gd32f4xx_it.c index 3d93d27..9315a02 100644 --- a/Hyt2/GD32F4xx_Firmware_Library/SYSTICK/gd32f4xx_it.c +++ b/Hyt2/GD32F4xx_Firmware_Library/SYSTICK/gd32f4xx_it.c @@ -246,16 +246,16 @@ void EXTI5_9_IRQHandler(void) if ( !gpio_input_bit_get(GPIOE, GPIO_PIN_9) ) { exti_init(EXTI_9, EXTI_INTERRUPT, EXTI_TRIG_RISING);//上升沿中断 - timer_enable(TIMER12);//使能定时器 - timer_counter_value_config(TIMER12, 0u); + timer_enable(TIMER4);//使能定时器 + timer_counter_value_config(TIMER4, 0u); // ptz_hori_timer_stop(); g_dcStepHori = 0; } else { exti_init(EXTI_9, EXTI_INTERRUPT, EXTI_TRIG_FALLING);//下降沿中断 - timer_disable(TIMER12);//失能定时器 - timer_counter_value_config(TIMER12, 0u); + timer_disable(TIMER4);//失能定时器 + timer_counter_value_config(TIMER4, 0u); g_dcStepHori = 1; } /*function end*/