> On Friday, September 22, 2017 at 11:05:55 AM UTC-5, john3909 wrote:
>>
>> You do realize that you can achieve the same sample rate with the IIO
>> driver in Linux?
>>

No, I didn't know that. Thanks for mentioning that.


On Sat, Sep 23, 2017 at 12:56 AM, Jeff Andich <jeff.and...@gmail.com> wrote:
> Not delving into each implementation, and not knowing anything about the IIO
> driver, I would think the PRU implementation would offload the utilization
> of the Linux CPU (Arm9?) vs the IIO driver.   Is this true?

I'm not really sure whether or not the call to prussdrv_pru_wait_event
is really implemented as an interrupt or that it actually polls.

In the guide,

http://processors.wiki.ti.com/index.php/PRU_Linux_Application_Loader_API_Guide

there is a call to prussdrv_start_irqthread , which is not in the
prussdrv.h (version 0.20170730 from my own repo http://beagle.tuks.nl
), so I kept the pthread code from the original source...

If it's a real interrupt, the arm gets like 128 samples (block_size) a
time and thus gets interrupted 128 times less, assuming the IIO driver
uses adc interrupts.


However, since the pru code is in c, one can also offload some further
code to the pru, depending on what one wishes to do with the samples.



In my case, for example,  I am working on a project to study the
so-called "capacitor soakage" phenomenon:

https://en.wikipedia.org/wiki/Dielectric_absorption
https://github.com/l4m4re/SoakageTester

In this application, I charge and discharge a capacitor under control
of the beagle, whereby I use the adc to measure voltage and current
over/trough the capacitor.

In this case, the voltage over the capacitor is used to switch the
charge and discharge control mosfets on/off, which I am currently
doing with the arm . I might move that to the pru as well, which would
improve reaction time and thus accuracy of the measurement cycle.


>
> Also I thin the posted examples are worthwhile to those interfacing with an
> external ADC and to those who are wanting more PRU coding examples..
>
> regards and thanks for posting your project!
>

Thanks for your comments and regards,

Arend.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOYv6OMq2g1-1h1y-yhU9fCeuBcgnAtAg26df7WxhXxfSu%3DGQw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to