From 5c8d7678df2408fed6f1fbdb79d014cfde238afd Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Wed, 18 Jan 2017 09:38:50 +0100 Subject: [PATCH] boards/stm32f4discovery: fix PWM configuration --- boards/stm32f4discovery/include/periph_conf.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/boards/stm32f4discovery/include/periph_conf.h b/boards/stm32f4discovery/include/periph_conf.h index 19f90b2159..4b0b9366bb 100644 --- a/boards/stm32f4discovery/include/periph_conf.h +++ b/boards/stm32f4discovery/include/periph_conf.h @@ -166,14 +166,16 @@ static const pwm_conf_t pwm_config[] = { .af = GPIO_AF1, .bus = APB2 }, - // { - // .dev = TIM3, - // .rcc_mask = RCC_APB1ENR_TIM3EN, - // .chan = { GPIO_PIN(PORT_B, 4), GPIO_PIN(PORT_B, 5), - // GPIO_PIN(PORT_B, 0), GPIO_PIN(PORT_B, 1) }, - // .af = GPIO_AF2, - // .bus = APB1 - // } + { + .dev = TIM3, + .rcc_mask = RCC_APB1ENR_TIM3EN, + .chan = { { .pin = GPIO_PIN(PORT_B, 4), .cc_chan = 0 }, + { .pin = GPIO_PIN(PORT_B, 5), .cc_chan = 1 }, + { .pin = GPIO_PIN(PORT_B, 0), .cc_chan = 2 }, + { .pin = GPIO_PIN(PORT_B, 1), .cc_chan = 3 } }, + .af = GPIO_AF2, + .bus = APB1 + } }; #define PWM_NUMOF (sizeof(pwm_config) / sizeof(pwm_config[0]))