We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, I had a design counting pulses from pin T3IN on GPT1-T3. The design now requires a pulse width to be measured instead of pulses being counted. Our hardware has access ONLY to T3IN, not CAPIN etc.
Problem: How can I set up GPT1/2 to measure the pulse width with only T3IN pin ?
Still getting to grips with capture/reload and interrupts, but reckon someone's done this before...!
Thanks for any advice. Rup.
You can capture timer T5 value to CAPREL register on T3IN transition(s), and get an interrupt. Read timer block GPT2 description.
Sauli
Thanks Sauli, I ended up coding a solution through GPT5, T3 and CAPREL as the manual shows, although this gives an interrupt on both edges, (unless I've misunderstood it)which as I said I don't want. The benefit is measurement of the mark and space values for safety checking, so that'll do.