Durgod: Increase scan rate by using wait_us GPT timer (#14091)

Lower the tick rate from 10kHz to 1kHz (otherwise all the extra interrupts
reduce the achievable scan rate). Enable the WAIT_US_TIMER using GPT TIM3.

Observed scan rate on the K320 is increased from 625Hz to 2090-2120Hz.
This commit is contained in:
Simon Arlott
2021-12-27 03:04:26 +00:00
committed by GitHub
parent dfe5fe7181
commit c93935f243
6 changed files with 13 additions and 2 deletions

View File

@@ -21,7 +21,7 @@
#pragma once
#define CH_CFG_ST_FREQUENCY 10000
#define CH_CFG_ST_FREQUENCY 1000
#define CH_CFG_ST_TIMEDELTA 0

View File

@@ -85,7 +85,7 @@
*/
#define STM32_GPT_USE_TIM1 FALSE
#define STM32_GPT_USE_TIM2 FALSE
#define STM32_GPT_USE_TIM3 FALSE
#define STM32_GPT_USE_TIM3 TRUE
#define STM32_GPT_USE_TIM14 FALSE
#define STM32_GPT_TIM1_IRQ_PRIORITY 2
#define STM32_GPT_TIM2_IRQ_PRIORITY 2