cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible to set different channels of timerX for different mode at same time?

DBehe.1
Associate II

suppose timer2 has 4 channels , i want to use channel1 as input capture mode and channel2 as output compare mode. is it possible?? please help me!!!!

2 REPLIES 2

Yes.

Read the timer chapter in reference manual. The TIMx_CCMRy register fields can be set independently for each channel.

Note, that there's still only one counter, i.e. you cannot for example generate different frequency PWMs on different channel. The channels set to input capture also would use only that one counter as the "timestamp" source.

JW

Thank you so much!!!