Browse Source

Merge pull request #6404 from haukepetersen/fix_stm32f4discovery_pwmdefs

boards/stm32f4discovery: fix PWM configuration
pr/spi.typo
Peter Kietzmann 6 years ago committed by GitHub
parent
commit
922e3bee25
  1. 18
      boards/stm32f4discovery/include/periph_conf.h

18
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]))

Loading…
Cancel
Save