diff --git a/boards/msbiot/Makefile.features b/boards/msbiot/Makefile.features index 270210e70a..dd0821a0f8 100644 --- a/boards/msbiot/Makefile.features +++ b/boards/msbiot/Makefile.features @@ -1,3 +1,3 @@ FEATURES_PROVIDED += cpp -FEATURES_PROVIDED += periph_uart periph_gpio periph_spi +FEATURES_PROVIDED += periph_uart periph_gpio periph_spi periph_pwm FEATURES_PROVIDED += transceiver diff --git a/boards/msbiot/include/periph_conf.h b/boards/msbiot/include/periph_conf.h index 9499bf42ef..f8261ca407 100644 --- a/boards/msbiot/include/periph_conf.h +++ b/boards/msbiot/include/periph_conf.h @@ -70,6 +70,26 @@ extern "C" { #define TIMER_1_IRQ_CHAN TIM5_IRQn /** @} */ +/** + * @name PWM configuration + * @{ + */ +#define PWM_NUMOF (1U) +#define PWM_0_EN 1 +#define PWM_MAX_CHANNELS 1 /* Increase if Timer with more channels is used */ + +/* PWM 0 device configuration */ +#define PWM_0_DEV TIM11 +#define PWM_0_CHANNELS 1 +#define PWM_0_CLK (168000000U) +#define PWM_0_CLKEN() (RCC->APB2ENR |= RCC_APB2ENR_TIM11EN) +#define PWM_0_CLKDIS() (RCC->APB2ENR &= ~RCC_APB2ENR_TIM11EN) +/* PWM 0 pin configuration */ +#define PWM_0_PORT GPIOB +#define PWM_0_PORT_CLKEN() (RCC->AHB1ENR |= RCC_AHB1ENR_GPIOBEN) +#define PWM_0_PIN_CH0 9 +#define PWM_0_PIN_AF 3 +/** @} */ /** * @name UART configuration