cancel
Showing results for 
Search instead for 
Did you mean: 

PWM input capture

geoffreymbrown
Associate II
Posted on April 23, 2012 at 21:16

It looks to me like the hardware for Tim4 will support PWM input capture on channel 3/4,

but when I look at the source code for the standard peripheral library  (V3.5.0) the procedure

TIM_PWMIConfig appears to be hardwired to channels 1/2 -- am I missing something ?  

BTW PWM input capture is pretty badly documented in both the reference manuals and the examples with the standard peripheral library !

Geoffrey
1 REPLY 1
Posted on April 23, 2012 at 23:49

Yes, there would appear to be a bunch of code missing. You could add in support for channels 3 & 4 pairing, or use TIM_ICInit() for each channel. I haven't used the channels in this mode, but they are diagrammed to support it.

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