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.

SPI example with 16 bit character width?

Hello,

I'm playing with the example from pspdrivers_01_20_00\packages\ti\pspiom\examples\evm6747\spi\edma\. I changed the configuration so that the DSP is in slave mode and character length is 16 bit. The example worked, but I got only rubbish as input...

Then a colleague found this:

Spi_edma.c :

Int Spi_localEdmaTransfer(Spi_Object      *instHandle,
                          Spi_DataParam   *dataParam)
{

....


        /* FIFO width is 8 bit                                                */
        paramSet.opt &= 0xFFFFF8FFu;

....

}

 

So we changed our setup to send 8 bit characers and we got sane data. Now I wonder how to change the example to use 16 bit characters.... I figured out that I might have to use

EDMA3_DRV_FifoWidth in combination with EDMA3_DRV_setSrcParams/EDMA3_DRV_setDestParams but didn't get much further... Is there some documentation for this? The "EDMA3 DRIVER DATASHEET" mentions a "EDMA3 Driver Help File" but neither google nor I were able to find it...

 

TIA

Markus

  • Hi Markus,

    Could you please replace existing code,

            if (FALSE == chanHandle->rxBufFlag)
            {
                paramSet.destBIdx = 0;
            }
            else
            {
                paramSet.destBIdx = 1;
            }

    with

            if (FALSE == chanHandle->rxBufFlag)
            {
                paramSet.destBIdx = 0;
            }
            else
            {
                paramSet.destBIdx = acntFlag;
            }

     

    in the function Spi_localEdmaTransfer() in the file spi_edma.c and rebuild the SPI driver.

    Regards,

    Sandeep K