Timer capture / PWM signal read

Post Reply
Wolferl
Posts: 11
Joined: Wed Dec 19, 2018 1:52 am
languages_spoken: english, german
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Timer capture / PWM signal read

Unread post by Wolferl » Thu Dec 20, 2018 11:41 pm

Hi folks,

I need to read the frequency of a square wave signal (it is a PPM signal from a RC receiver), usually this is done via a timer capture.
It does not need to be super precise, and I only need to capture the time between two adjacent rising edges.

Does anybody have a pointer or example how this can be done?

Thanks in advance,
Wolferl

User avatar
odroid
Site Admin
Posts: 31377
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 52 times
Been thanked: 184 times
Contact:

Re: Timer capture / PWM signal read

Unread post by odroid » Fri Dec 21, 2018 9:37 am

You might need to use a GPIO IRQ to trigger timers.
https://wiki.odroid.com/odroid-c2/appli ... e/gpio/irq

Or, this kernel driver module example might be helpful too.
viewtopic.php?f=112&t=18559

Wolferl
Posts: 11
Joined: Wed Dec 19, 2018 1:52 am
languages_spoken: english, german
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Timer capture / PWM signal read

Unread post by Wolferl » Fri Dec 21, 2018 6:33 pm

I'll have a look at it.

Thank you very much!

Cheers,
Wolferl

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 2 guests