STM32+FreeRTOS+CUBEMX_学习笔记(七 )输入捕获
2022-01-07 来源:eefocus
前言
我们可以利用输入捕获模式来测量脉冲宽度或者测量频率。
1、cube设置
2、函数详解:
/**
* @brief Read the captured value from Capture Compare unit 读取通道捕获值
* @param htim TIM handle.
* @param Channel TIM Channels to be enabled
* This parameter can be one of the following values:
* @arg TIM_CHANNEL_1: TIM Channel 1 selected
* @arg TIM_CHANNEL_2: TIM Channel 2 selected
* @arg TIM_CHANNEL_3: TIM Channel 3 selected
* @arg TIM_CHANNEL_4: TIM Channel 4 selected
* @retval Captured value
*/
uint32_t HAL_TIM_ReadCapturedValue(TIM_HandleTypeDef *htim, uint32_t Channel)
相关文章