This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PRU and SPI ADC

Other Parts Discussed in Thread: AM3359

Hi,

I am actually desgigning a system that communicates through many interfaces (RS485, RS232, Ethernet) and have the possibility to acquire ADC data trrough SPI at a frequency of 400kHz.

My choise has been made for the AM3359, from the Sitara family. However, the Linux OS can't be real time enough to make the ADC part so I decided to use the PRU.

I have been reading the PRU-ICSS overview and I saw that the PRU owns a UART connection but no SPI. The only thing that is SPI related is the interrupt on MCSPI.

My question is, is it possible to use the main core SPI with the PRU ? Send and receive data to be treated in real time ?

Thank you.

  • Hi Julien,

    It is possible to use the PRU to communicate with the SPI peripheral. Although there's no specific details, there is a short discussion outlining that here.

    The one big caveat is what Frank mentions in this thread - PRU accesses outside of the PRUSS are going to be considerably slower than accesses to its internal resources. I don't have any hard numbers to provide, so you will need to tinker with it and see if it meets your needs. If not, a bit-banging solution should be more than ample timing-wise.

    You may want to use the Linux or StarterWare SPI driver to get started on how to use the peripheral itself, and then port that into PRU code. The interrupt code will change as the PRU interrupt controller is different from the ARM INTC. As far as the process flow for communication goes this should remain largely the same.