I just faced the same problem, I wanted to output a PWM signal on TIM15 on a STM32F072. I didn't need any IRQs/callback.
To make it compile (current ChibiOS git master branch) I configured it like this in mcuconf.h:
Code: Select all
#define STM32_PWM_USE_TIM15 TRUE
#define STM32_TIM15_SUPPRESS_ISR
Then it compiled, but the outputs stayed inactive.
After reading the reference manual and checking all the required bits, I saw that the MOE bit needs to be enabled for TIM15 to work as output on the STM32F072. So I added this after the pwmStart call:
Code: Select all
PWMD15.tim->BDTR = STM32_TIM_BDTR_MOE;
Now it works as expected.
The code responsible for setting MOE in the TIMv1 LLD looks like this:
Code: Select all
#if STM32_PWM_USE_TIM1 || STM32_PWM_USE_TIM8 || STM32_PWM_USE_TIM20
#if STM32_PWM_USE_ADVANCED
pwmp->tim->BDTR = pwmp->config->bdtr | STM32_TIM_BDTR_MOE;
#else
pwmp->tim->BDTR = STM32_TIM_BDTR_MOE;
#endif
#endif
TIM15 is not an advanced timer, but it still needs the MOE bit set on the F0. I checked other timers on the F0 and MOE seems to be necessary for TIM16 and TIM17 too, but TIM2, TIM3 and TIM14 don't need it. So at least for the F0 the upper condition would have to be expanded to
Code: Select all
#if STM32_PWM_USE_TIM1 || STM32_PWM_USE_TIM8 || STM32_PWM_USE_TIM15 || STM32_PWM_USE_TIM16 || STM32_PWM_USE_TIM17 || STM32_PWM_USE_TIM20
but I haven't cross checked other STM32 series if this is valid for them too.
This probably qualifies as a bug report now