Skip to main content
DBehe.1
Associate
May 12, 2020
Question

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

  • May 12, 2020
  • 2 replies
  • 745 views

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!!!!

This topic has been closed for replies.

2 replies

waclawek.jan
Super User
May 12, 2020

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

DBehe.1
DBehe.1Author
Associate
May 12, 2020

Thank you so much!!!