cancel
Showing results for 
Search instead for 
Did you mean: 

PWM input using InputCapture - Stm32Cube

mohamad_armoon
Associate III
Posted on October 29, 2016 at 11:30

Hi everybody

I need to get PWM input value using input capture .

I set Input Capture in Both Edge mode and I'm getting the HAL_TIM_IC_CaptureCallback very well . but for calculating the PWM duty cycle I need to know if Callback is for Rising Edge or Falling.

How can we do it in HAL library?

I have to mention I don't have enough time channels to use 2 channel (one for rising and one for falling) per each PWM input  , so I suppose the other options are using one IC per channel or using EXTI ,

any help would be appreciated

Thanks in advance 

MA.
2 REPLIES 2
Posted on October 29, 2016 at 17:21

What frequencies are involved?

Can you not just look at the GPIO state?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mohamad_armoon
Associate III
Posted on November 01, 2016 at 15:58