From 97fcfe5e9d5a50dc88ed5d0a65b5d163dbba011d Mon Sep 17 00:00:00 2001 From: mikeller Date: Mon, 22 Feb 2021 22:37:54 +1300 Subject: [PATCH] Fixed incorrect timer mapping for STM32G4. --- src/main/drivers/timer_def.h | 2 +- src/main/drivers/timer_stm32g4xx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/drivers/timer_def.h b/src/main/drivers/timer_def.h index d4656e1a15..714545b78b 100644 --- a/src/main/drivers/timer_def.h +++ b/src/main/drivers/timer_def.h @@ -1340,7 +1340,7 @@ #define DEF_TIM_AF__PB15__TCH_TIM1_CH3N D(4, 1) #define DEF_TIM_AF__PB0__TCH_TIM1_CH2N D(6, 1) -#define DEF_TIM_AF__PB0__TCH_TIM1_CH3N D(6, 1) +#define DEF_TIM_AF__PB1__TCH_TIM1_CH3N D(6, 1) #define DEF_TIM_AF__PB13__TCH_TIM1_CH1N D(6, 1) #define DEF_TIM_AF__PB14__TCH_TIM1_CH2N D(6, 1) diff --git a/src/main/drivers/timer_stm32g4xx.c b/src/main/drivers/timer_stm32g4xx.c index dd30fe16e4..f2e0efae51 100644 --- a/src/main/drivers/timer_stm32g4xx.c +++ b/src/main/drivers/timer_stm32g4xx.c @@ -126,7 +126,7 @@ const timerHardware_t fullTimerHardware[FULL_TIMER_CHANNEL_COUNT] = { DEF_TIM(TIM1, CH3N, PB15, TIM_USE_ANY, 0, 0, 0), DEF_TIM(TIM1, CH2N, PB0, TIM_USE_ANY, 0, 0, 0), - DEF_TIM(TIM1, CH3N, PB0, TIM_USE_ANY, 0, 0, 0), + DEF_TIM(TIM1, CH3N, PB1, TIM_USE_ANY, 0, 0, 0), DEF_TIM(TIM1, CH1N, PB13, TIM_USE_ANY, 0, 0, 0), DEF_TIM(TIM1, CH2N, PB14, TIM_USE_ANY, 0, 0, 0),