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.

DSP as SPI slave example?

Hello,

 

Is there an example for a C6747 (or similar) as SPI slave, using DMA for memory transfer?

I would need this for my setup where I continuously get blocks of data from an FPGA as SPI master to my DSP slave. SPRUFM4H ("C6747 DSP Serial Peripheral Interface (SPI) User's Guide") is ok as a reference, but it's hard to start from scratch with this document.

The "C6747 BIOS PSP User Guide"  seems to be ok for a start, but I don't manage to configure the DSP as SPI slave

( see: http://e2e.ti.com/support/embedded/f/355/p/84636/291892.aspx#291892).

 

Thanks,

Markus

  • Markus,

     

    There are some points needs to be taken care for slave mode sample application,

     

    1.       Only data format ‘0’ can be used.

     

    2.       The "clkinternal" needs to be made false,

     

    spiParams.spiHWconfig.clkInternal = FALSE;

     

    3.       The spi  parameter has to be changed to support slave mode, with the option “Spi_CommMode_SLAVE”.

     

    spiParams.spiHWCfgData. masterOrSlave = Spi_CommMode_SLAVE;

     

    4.       To capture the data from the Master, the following code can be taken as the reference,

     

    dataparam.bufLen            = 100; // to capture 100 bytes

                    dataparam.inBuffer          = &loopRead[0];

                    dataparam.outBuffer       = NULL;

                    dataparam.dataFormat   = Spi_DataFormat_0;

                    dataparam->chipSelect   = 0x00;

     

                   size = dataparam.bufLen;

     

                 /* write data to slave                                                    */

    status = GIO_write(spiHandle, &dataparam, &size); // read the data from the master

               

                 /* validate the data received*/

     

    Thanks and Regards,

    Sandeep K

  • Sandeep,

    With the c6747 as the slave to a peripheral device, how do you transmit data to the peripheral through the SPI using EDMA3? Can you provide an example of this scenario?

    Thanks,

    Amanda

  • Amanda,

    Would you please share the email ID? So that, I can share the SPI slave sample application, which you can use it as a reference? 

    Thanks and Regards,

    Sandeep K

  • Hello Sandeep,

    I also have a troubled customer using PSPBIOS SPI driver in slave mode. 

    Could you send me the SPI slave sample code?

    Best regards,

    Nori Shinozaki

  • Sandeep K,

    I also have a troubled customer using PSPBIOS SPI driver in slave mode. 

    Could you send me the SPI slave sample code? Email: waip23@gmail.com

    Thank you!

  • I also have SPI problem...plz help me.

    how to control directly Enable(Synch) Signal?

    please give me Control Registry Information.