From 3865a9ec37dd7d2991672ed479646755fb2625fc Mon Sep 17 00:00:00 2001
From: liuzhigang <15608060653@163.com>
Date: 星期四, 13 十一月 2025 11:09:49 +0800
Subject: [PATCH] 新增PWM控制,蓝牙功能

---
 STM32H743/Core/Src/stm32h7xx_it.c |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/STM32H743/Core/Src/stm32h7xx_it.c b/STM32H743/Core/Src/stm32h7xx_it.c
index aa119d7..f753a2b 100644
--- a/STM32H743/Core/Src/stm32h7xx_it.c
+++ b/STM32H743/Core/Src/stm32h7xx_it.c
@@ -20,10 +20,9 @@
 /* Includes ------------------------------------------------------------------*/
 #include "main.h"
 #include "stm32h7xx_it.h"
-#include "bluetooth.h"
-
 /* Private includes ----------------------------------------------------------*/
 /* USER CODE BEGIN Includes */
+#include "bluetooth.h"
 /* USER CODE END Includes */
 
 /* Private typedef -----------------------------------------------------------*/
@@ -57,9 +56,9 @@
 /* USER CODE END 0 */
 
 /* External variables --------------------------------------------------------*/
-extern TIM_HandleTypeDef htim1;
 extern TIM_HandleTypeDef htim2;
 extern TIM_HandleTypeDef htim3;
+extern TIM_HandleTypeDef htim4;
 extern DMA_HandleTypeDef hdma_usart1_rx;
 extern DMA_HandleTypeDef hdma_usart1_tx;
 extern DMA_HandleTypeDef hdma_usart2_rx;
@@ -275,20 +274,6 @@
 }
 
 /**
-  * @brief This function handles TIM1 update interrupt.
-  */
-void TIM1_UP_IRQHandler(void)
-{
-  /* USER CODE BEGIN TIM1_UP_IRQn 0 */
-
-  /* USER CODE END TIM1_UP_IRQn 0 */
-  HAL_TIM_IRQHandler(&htim1);
-  /* USER CODE BEGIN TIM1_UP_IRQn 1 */
-
-  /* USER CODE END TIM1_UP_IRQn 1 */
-}
-
-/**
   * @brief This function handles TIM2 global interrupt.
   */
 void TIM2_IRQHandler(void)
@@ -314,6 +299,20 @@
   /* USER CODE BEGIN TIM3_IRQn 1 */
 
   /* USER CODE END TIM3_IRQn 1 */
+}
+
+/**
+  * @brief This function handles TIM4 global interrupt.
+  */
+void TIM4_IRQHandler(void)
+{
+  /* USER CODE BEGIN TIM4_IRQn 0 */
+
+  /* USER CODE END TIM4_IRQn 0 */
+  HAL_TIM_IRQHandler(&htim4);
+  /* USER CODE BEGIN TIM4_IRQn 1 */
+
+  /* USER CODE END TIM4_IRQn 1 */
 }
 
 /**
@@ -390,6 +389,7 @@
         temp  =  __HAL_DMA_GET_COUNTER(&hdma_usart6_rx);
         uart6_dma_recv_len =  UART6_DMA_RX_BUF_SIZE - temp;
         uart6_dma_recv_end_flag = 1;
+		HAL_UART_Receive_DMA(&huart6, uart6_dma_rxbuf, UART6_DMA_RX_BUF_SIZE);
     }
 
   /* USER CODE END USART6_IRQn 0 */

--
Gitblit v1.9.3