Capturing PWM

Create timer for capture PWM via interrupts
This commit is contained in:
2024-09-02 09:28:38 +03:00
parent 4ad21d4102
commit 78e0a88604
5 changed files with 132 additions and 49 deletions

View File

@@ -22,6 +22,7 @@
#include "stm32f1xx_it.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "usart.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
@@ -41,7 +42,8 @@
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
extern uint8_t receiveBuffer[BUFFER_SIZE];
extern uint8_t transmitBuffer[BUFFER_SIZE];
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
@@ -201,21 +203,6 @@ void SysTick_Handler(void)
/* please refer to the startup file (startup_stm32f1xx.s). */
/******************************************************************************/
/**
* @brief This function handles EXTI line3 interrupt.
*/
void EXTI3_IRQHandler(void)
{
/* USER CODE BEGIN EXTI3_IRQn 0 */
/* USER CODE END EXTI3_IRQn 0 */
HAL_GPIO_EXTI_IRQHandler(PWM_CTRL_Pin);
/* USER CODE BEGIN EXTI3_IRQn 1 */
/* USER CODE END EXTI3_IRQn 1 */
}
/**
* @brief This function handles TIM1 update interrupt.
*/