cancel
Showing results for 
Search instead for 
Did you mean: 

TIM PWM input mode

matic
Associate III
Posted on May 17, 2016 at 22:58

Hi.

I would like to use PWM input mode on a TIM1. PWM signal on my custom PCB is connected to TIM1 channel 4. Now, I figured out that CubeMX allows to configure PWM input mode only, if PWM signal is connected to channel 1 or 2. Thus, CNT values would be captured in CCR1 and CCR2 registers.

I am asking, if it is also possible to connect channel 4 and channel 3 to PWM input mode? Ref. manual doesn't explicitly say that this combination could not be configured. Any idea?

Edit: I already found out in other topics that PWM input mode is possible only on CH1 and CH2.

Thanks
1 REPLY 1
Posted on May 17, 2016 at 23:25

No, you'll have to use Input Capture mode and deal with the fact that CNT will not reset. This will involve doing a delta measurement between two subsequent captures, ie B-A

CH4 can act as an alternate input source for CH3

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..