2015-03-12 05:51 PM
Hi, we're using stm32f103c8t6 to generate various PWM signals to various components on the PCB. TIM1,3,4 are used to generate different PWMs and TIM2 is used as a 1ms timer. Recently we've realized that we will need to generate another PWM (500kHz) but there is no other timer left to do it. The pin for the needed PWM is wired to TIM2. Is there any way how to effectively use TIM2 for PWM and normal tick operation?
The PWM frequency on TIM2 is the same as the one TIM4 but the wiring is wrong. We might need to reconsider wiring in the end but I'm just checking if there is maybe an option without need to rewire.Thanks2015-03-12 06:20 PM
Can't you use SysTick for a general 1ms ticker?
2015-03-15 12:13 PM
Hm, not really, using that one as 1us timer. I guess we could just trigger the ms handler every 1000 times of triggering the us timer but that doesn't seem to be very nice.
2015-03-15 12:58 PM
Interrupting at 1 MHz is excessively rapid, are you sure you can't get microsecond timing more efficiently?