From c93935f243dc7170dadfc2daf95e055fec56df6d Mon Sep 17 00:00:00 2001 From: Simon Arlott <70171+nomis@users.noreply.github.com> Date: Mon, 27 Dec 2021 03:04:26 +0000 Subject: 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. --- keyboards/durgod/boards/DURGOD_STM32_F070/chconf.h | 2 +- keyboards/durgod/boards/DURGOD_STM32_F070/mcuconf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards/durgod/boards') diff --git a/keyboards/durgod/boards/DURGOD_STM32_F070/chconf.h b/keyboards/durgod/boards/DURGOD_STM32_F070/chconf.h index a7d95c51a9..d70f188178 100644 --- a/keyboards/durgod/boards/DURGOD_STM32_F070/chconf.h +++ b/keyboards/durgod/boards/DURGOD_STM32_F070/chconf.h @@ -21,7 +21,7 @@ #pragma once -#define CH_CFG_ST_FREQUENCY 10000 +#define CH_CFG_ST_FREQUENCY 1000 #define CH_CFG_ST_TIMEDELTA 0 diff --git a/keyboards/durgod/boards/DURGOD_STM32_F070/mcuconf.h b/keyboards/durgod/boards/DURGOD_STM32_F070/mcuconf.h index 6d67aa96aa..a24c1cee12 100644 --- a/keyboards/durgod/boards/DURGOD_STM32_F070/mcuconf.h +++ b/keyboards/durgod/boards/DURGOD_STM32_F070/mcuconf.h @@ -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 -- cgit v1.2.3