What is the architecture?
Most ADCs are SPI or I2C.
The performance depends on the sw and hw architecture as well as the joule mraa capabilities, or custom drivers. As well as the OS architecture, compiler optimization, idle percentage, ISR priority settings, ...
If you you connect the ADC EOC (End Of Conversion) pin to a Tuchuck J12/J13 ISR GPIO input pin on the Joule. The ISR could attempt to transfer each conversion, but with a 25MBit SPI Clock , a 10MHz sample rate is inadequate. If the ADC has an internal buffer, and the ADC generates an interrupt when the buffer is 3/4 full, multiple transfers can occur withing the ISR.
ADC parallel bus output, the joule GPIO is not grouped as a contiguous byte or word as far as I am aware. If the ADC generates an interrupt on EOC, the ADC_ISR GPIO input pin, will trigger the ISR handler, and a parallel read (or multiple bit reads) can be performed to save/buffer the ADC value.
Definitely scenario 2. Do i have DMA access? I want to record a few seconds of data at 10+MHz, and i dont want an OS messing up my timing
Do you know the maximum speed i can read a GPIO? I don't suppose i can read it at up to the processor speed...
Here is some metrics for GPIO writes using nodejs and c++. Have not tested GPIO performance, as of yet with various languages (python).
you may want to look at:
Ubuntu Core, sudo classic, sudo nodejs gpioTest.js // note: these results of 10.6us were the same for a C++ executable looping on write 0, write 1
period is ~10.6us, such that a single write requires ~5.3us
sudo nodejs gpioTest.js
MRAA Version: v1.5.1
var m = require('mraa'); //require mraa
console.log('MRAA Version: ' + m.getVersion()); //write the mraa version to the console
var myPin= new m.Gpio(2);
myPin.dir(m.DIR_OUT); //set the gpio direction to output
var pinState= true; //Boolean to hold the state of the pin
pinState= !pinState; //invert the pin
is typically the same ~10.6us (notice the short period high which occasional hits: ~15us)