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.

Linux/PROCESSOR-SDK-AM335X: SPI PIO read issue

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

Hello All,

I'll explain my setup in brief. I have custom board with AM335x, the SPI interfaces is connected to Altera FPGA Cyclone 10.  I am using SPI DMA and PIO to interact with slave FPGA to control and send information. 

The Slave device responds to the commands from SPI-master (AM335x) in the same clock cylce. It uses 16bit word with TCS set to '3'.

Here's my problem statement:

I use PIO for Tx and Rx, Transmission of data to FPGA is fast enough but there is big delay in RxS register update. On the scope i can see that the slave has responded on MISO pin but it takes 30 ms for the RxS to register the availability of data. But some times RxS register update takes only 0 ms.

Q1. Is there a way out ? any settings or suggestions ?

Linux version : 3.12.10

TI-SDK- 7.0

OMAP2 McSPI controller driver

Extract from DTS file:

&spi1 {
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins>;
ti,pindir-d0-out-d1-in = <1>;

dmas = <&edma 42
&edma 43
&edma 44
&edma 45>;
dma-names = "tx0", "rx0", "tx1", "rx1";


status = "okay";

spi1@1 {
reg = <1>;
spi-max-frequency = <24000000>;
interrupt-parent = <&gpio0>;
interrupts = <26 IRQ_TYPE_LEVEL_HIGH>;
};
};