I have a problem I don't understand. I'm using stm072R8-discovery board, and I'm trying to bring up various functionality: ADC, DAC, watchdog, PWM output.
I'm facing a problem with pwm.
after enabling in halconf.h
Code: Select all
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
#define HAL_USE_PWM TRUE
#endif
and inside mcuconf.h
Code: Select all
/*
* PWM driver system settings.
*/
#define STM32_PWM_USE_ADVANCED FALSE
#define STM32_PWM_USE_TIM1 FALSE
#define STM32_PWM_USE_TIM2 TRUE
#define STM32_PWM_USE_TIM3 FALSE
#define STM32_PWM_TIM1_IRQ_PRIORITY 3
#define STM32_PWM_TIM2_IRQ_PRIORITY 3
#define STM32_PWM_TIM3_IRQ_PRIORITY 3
I got #error "ST requires TIM2 but the timer is already used"
The pin I'm using is PB3 that corresponds to TIM2_CH2 and I don't think I'm using TIM2 for other functionality
What could be the problem?
Thanks