Skip to main content
geoffreymbrown
Associate III
April 23, 2012
Question

PWM input capture

  • April 23, 2012
  • 1 reply
  • 701 views
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
    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    April 23, 2012
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..