AnsweredAssumed Answered

ADSP-21261 SPI Core TX & RX slow

Question asked by 940nm on Oct 22, 2014
Latest reply on Oct 22, 2014 by 940nm

Hello,

 

I'm using the SPI as a core transfer on the 21261.

 

If I just TX data then the speed of the SPI port is as expected and the data arrives ok.

 

If I look to RX data then the speed of the transfer is over 12 times slower as the DSP waits for the data to be read from the RXSPI reg.

 

Is my code clunky (below), is something else not right or is this expected performance?

 

// SPICTL

*pSPICTL = (MSBF|TIMOD1|WL8|SPIMS|CLKPL|GM|SENDZ|CPHASE);

 

for (i = 0; i < SPI_DATA_SIZE; i++)

{

       *pTXSPI = txBuffer[i];

       while(1)

       {

            iX = *pSPISTAT;

            iX & = (RXS);

            if (iX) break;

       }

       rxBuffer[i] = *pRXSPI;

}

 

 

Will DMA transfers speed this up considerably? Having to do separate reads and write passes (due to one way DMA) will complicate things.

Outcomes