From 66ad31173bc363d9845cdd9730a052694d3b51f2 Mon Sep 17 00:00:00 2001 From: J Blackman Date: Tue, 15 Nov 2016 10:06:46 +1100 Subject: [PATCH] Fixed missing motor index on F7 DSHOT init --- src/main/drivers/pwm_output_stm32f7xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/drivers/pwm_output_stm32f7xx.c b/src/main/drivers/pwm_output_stm32f7xx.c index 1a3870236..b0d6b2367 100644 --- a/src/main/drivers/pwm_output_stm32f7xx.c +++ b/src/main/drivers/pwm_output_stm32f7xx.c @@ -130,7 +130,7 @@ void pwmDigitalMotorHardwareConfig(const timerHardware_t *timerHardware, uint8_t const uint8_t timerIndex = getTimerIndex(timer); const bool configureTimer = (timerIndex == dmaMotorTimerCount-1); - IOInit(motorIO, OWNER_MOTOR, 0); + IOInit(motorIO, OWNER_MOTOR, RESOURCE_INDEX(motorIndex)); IOConfigGPIOAF(motorIO, IO_CONFIG(GPIO_MODE_AF_PP, GPIO_SPEED_FREQ_VERY_HIGH, GPIO_PULLUP), timerHardware->alternateFunction); __DMA1_CLK_ENABLE();