You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
380 B
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 旋转编码器
- 初始化外部晶振配置SYSCLK与Timer Clock均为72MHz
- 将PA8、PA9分别配置为TIM1_CH1、TIM1_CH2
- 配置TIM1
- 将Combined Channels配置为Encoder Mode
- 可以配置Input Filter启用集成滤波器减少抖动范围0~15
- 配置USART2为Asynchronous
- 启动编码器HAL_TIM_Encoder_Start(&htim1, TIM_CHANNEL_ALL)