The IIO ADC driver can run at 800K samples per second. Here is the patch that 
made that possible. 

https://patchwork.kernel.org/patch/9391487/

I can confirm that I have tested the driver at 800Ksps and it works fine as 
long as you have a proper low impedance source for each ADC channel. CPU 
utilization was about 5% if I recall and that was probably used by the iiod 
daemon, which I used to display the waveform on a remote Linux app. 

There is example code in the original Starterware for McSPI, which should work 
fine if you are using the PRU low level drivers. 

Regards,
John




> On Feb 26, 2018, at 12:56 PM, [email protected] wrote:
> 
> Thanks John, 
> 
> I am now working with the starterware_PRU but i did not find examples for 
> using the McSPI with the PRU, do you think it will be hard to adapt the 
> initial code to the PRU ? 
> By the way, looking to the IIO driver documentation, it seems that for the 
> AM335x chip the max sampling rate is only 200k samples per second which may 
> not be enough :
> http://processors.wiki.ti.com/index.php/Linux_Core_ADC_Users_Guide ; am I 
> right ? 
> 
> 
> Thanks 
> 
> Pierrick 
> 
> Le lundi 19 février 2018 23:15:50 UTC-5, john3909 a écrit :
> Like I said, it was based on Starterware, so search Github for starterware 
> and you will see a project starterware_PRU. It does use the mcspi, so it is 
> not a bitbang implementation. 
> 
> Regards,
> John
> 
> 
> 
> 
>> On Feb 19, 2018, at 7:33 PM, [email protected] <> wrote:
>> 
>> Thanks John for you answer, I was quit busy last week so I worked on this 
>> during the Weekend. 
>> 
>> Unfortunately, I was not able to find a project that is using the SPI and 
>> I2C interface with the PRU, I only found this one : 
>> https://github.com/chanakya-vc/PRU-I2C_SPI_master/wiki/SPI-Master-Controller 
>> <https://github.com/chanakya-vc/PRU-I2C_SPI_master/wiki/SPI-Master-Controller>
>>  
>> But it is using bit banging for the SPI part and not using the on-board 
>> pull-up resistors for the I2C part.
>> 
>> Concerning the ADC, I'll have a loook at the UIIO drivers in the coming days 
>> it seems that it meets my need in term of real-time acquisition. 
>> 
>> Regards,
>> 
>> Pierrick 
>> 
>> -- 
>> For more options, visit http://beagleboard.org/discuss 
>> <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 [email protected] <>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/beagleboard/74949832-b67c-430f-811e-f3b2fff83852%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/beagleboard/74949832-b67c-430f-811e-f3b2fff83852%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> For more options, visit http://beagleboard.org/discuss 
> <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 [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/beagleboard/3dc611e5-04e7-45bb-87d4-3c21a5665cec%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/beagleboard/3dc611e5-04e7-45bb-87d4-3c21a5665cec%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/14F65A4F-6A27-48D2-83CA-A61E2EEB833B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to