cancel
Showing results for 
Search instead for 
Did you mean: 

Timers

sateesh babu gorumuchu
Associate II
Posted on May 11, 2018 at 11:33

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.

3 REPLIES 3
Posted on May 11, 2018 at 11:49

Please don't put the entire question in the summary/title, edit to fix.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Artur IWANICKI
ST Employee
Posted on May 17, 2018 at 07:50

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

henry.dick
Senior II
Posted on May 17, 2018 at 13:15

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