Hey There,
I'm running on the BeagleBone Black, with the default Debian Image. I'm about to interface a fast ADC (2 x 24bit @ 65536 Hz) to the AM335x, and I'm wondering what would be the best solution. The ADC has a DRDY (Data Ready) signal which is indicating when the when a convertion is done and the sample is ready to be read. DRDY is toggling at 65536 Hz. The converter is connected to an external precise clock, which is enabling the desired samplerate. The converter is communicating to the processor via SPI. So when data is ready (DRDY goes low), the processor should generate the SCLK to the converter, and read the sample like a regular SPI-connection.
It is crucial that the processor is picking up every sample. Im consireding two (maybe) possible solutions:
1: Using the McSPI-module. But I'm not sure if I can make the DRDY trigger the SPI-transfer with little enough latency, to transfer the sample, before the next sample has to be transfered (~11 micro sec)
2: Using the PRU. I could read the SPI sample with the right timing to the DRDY signal, simply by bit-banging all the signals, and then transfer the samples to some buffer on the host system.
I'm not sure which solution I would have the most chances with? Maybe it is possible to mix the two solutions somehow?
I hope that I've made myself clear. I'm looking for some kind to best practice of implementing a fast SPI-connection with strict timing requirements to the AM335x.
EDIT: Figure below inserted to clarify timing requirements