Measure time difference between 2 PWM using STM32L4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-23 2:03 AM
Hi Guys,
I working on a project that require measure time difference between 2 PWM (Refer the picture below) . I was able to measure the PWM frequency using input capture method but not able to measure the time difference, Td between 2 PWM. Kindly need help on this. Best with example code if possible.
Thanks.
Regards,
XH Low
- Labels:
-
STM32L4 series
-
TIM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-23 8:51 AM
I you use firefox, pasting picture does not work, even if it appears in the editor it did. But the image *is* uploaded, so it's enough to click on the "Image" icon below and insert the newest file from there.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-23 11:26 AM
get a timer which gives interrupt on input capture both rise and fall edge for both channels.
Basically, you get the timer "timestamp" for position of rising and falling edge of both channels.
You get the period, duty and time shift between them.
Properly defining the timer period is important. Timer is free running.
No prescale on input channel is allowed here.
