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.
高宏宇 ac12d716c1 初始化版本 2 years ago
..
.settings 初始化版本 2 years ago
Core 初始化版本 2 years ago
Debug 初始化版本 2 years ago
Drivers 初始化版本 2 years ago
.cproject 初始化版本 2 years ago
.mxproject 初始化版本 2 years ago
.project 初始化版本 2 years ago
Readme.md 初始化版本 2 years ago
STM32F103C8TX_FLASH.ld 初始化版本 2 years ago
Timer_RotaryEncoder Debug.launch 初始化版本 2 years ago
Timer_RotaryEncoder.ioc 初始化版本 2 years ago

Readme.md

旋转编码器

  • 初始化外部晶振配置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)