How to read PWM in BBB GPIO....?

738 views
Skip to first unread message

Sumit Bhut

unread,
Mar 30, 2016, 1:40:11 AM3/30/16
to BeagleBoard
How to read PWM in BBB GPIO....?

I need to 40kHz frequency read in BBB gpio....count frequency & find PWM With...........?

TJF

unread,
Mar 30, 2016, 11:09:24 AM3/30/16
to BeagleBoard
You don't need GPIOs. Instead analyse the pulse train by hardware. The eCAP modules in the PWMSS subsystems are designed for that purpose. The simplest (and most powerful) solution is to use libpruio. Check out the example pwm_cap.

BR

Micka

unread,
Mar 30, 2016, 11:34:58 AM3/30/16
to beagl...@googlegroups.com, jeli.f...@gmail.com
So to do that we need to put the Pin PR1_ECAP0_ECAP_CAPIN_APWM_O 
in input mode.

Where can we find the source code of the libpruio doing that in the pru ?

Le mer. 30 mars 2016 à 17:09, TJF <jeli.f...@gmail.com> a écrit :
You don't need GPIOs. Instead analyse the pulse train by hardware. The eCAP modules in the PWMSS subsystems are designed for that purpose. The simplest (and most powerful) solution is to use libpruio. Check out the example pwm_cap.

BR

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

TJF

unread,
Mar 30, 2016, 11:58:05 AM3/30/16
to BeagleBoard, jeli.f...@gmail.com


Am Mittwoch, 30. März 2016 17:34:58 UTC+2 schrieb Alex:
So to do that we need to put the Pin PR1_ECAP0_ECAP_CAPIN_APWM_O 
in input mode.

Where can we find the source code of the libpruio doing that in the pru ?

libpruio doesn't use PR1_ECAP0_ECAP_CAPIN_APWM_O pin configuration. Instead it uses the eCAP modules in the PWMSS-[0-2] subsystems (via OCP, not the PRU eCAP). And it doesn't do pinmuxing directly, but uses the driver pinmux_single by the device tree overlay libpruio.dtbo to put the pins in the matching mode.

Find all the source code in the package (as in the above links).

BR
Reply all
Reply to author
Forward
0 new messages