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 Slave Tx/Rx using a single GIO stream

Hi,

I am communicating with an ARM processor from C674x device, with the C674x configured as the slave. I am using the PSP SPI driver for this. I have read through the PSP SPI driver manual and it says that when working in slave mode, only one GIO channel can be used. I believe that by configuring the GIO channel as full duplex as follows:

spiHandle =  GIO_create("/Spi0", GIO_INOUT, &ioParams, &eb);

spiHandle can now be used to transmit and receive simultaneously. I am unsure about one point though. I am working in DMA interrupt mode; so in order to receive a message, my SPI task will wait at this call for a DMA interrupt:

status = GIO_read(spiHandle, &dataparam, &size);

Now, if I wish to transmit a message, it seems to me that I cannot do it from within this task as it will be pending a DMA Rx interrupt at the above line. I am currently experimenting with setting up a separate task to transmit an SPI message. This involves using the same GIO channel as above (spiHandle), where the following call:

status = GIO_write(spiHandle, &dataparam, &size);

will interrupt the SPI task pending a receive message. 

Is this the recommended approach for slave SPI using the PSP driver and GIO drivers; i.e. sending and receiving from separate tasks? 

Thanks

Brian