2018-05-11 02:33 AM
Hi,
I am using stm8s controller. I am using TIM1,TIM4 for timing delay now i need to use PWM for led blinking. Can i use TIM3(general purpose timer) for timing delay or not , because TIM1(16 bit advanced control timer) having 4 capcom channels for PWM that's why I am asking TIM1 using for PWM . Can I replace TIM1 with TIM3 or not .
Can you please help on this.
Thanks & Regards,
Sateesh.
2018-05-11 02:49 AM
Please don't put the entire question in the summary/title, edit to fix.
2018-05-16 10:50 PM
Hello,
Yes, you can use TIM3 instead TIM1 to generate delays. All of the timers have similar time base unit which is generating an update event on overflow which can be used to generate delays. TIM4 is used here usually due to the fact that we are not 'wasting' timer input/output channels which can be used to some other purposes.
Best Regards,
Artur
2018-05-17 04:15 AM
You can use any timer for delays. The overflow interrupt is often the way to go. If your timer has unused output compare channels they can be used for delays as well