cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

Anonymous
Not applicable

 

   

I have a question on how the FX3 API handles SPI transactions.

        CyU3PSpiTransmitWords    , the master FX3 sends data over MOSI, and also consumes the same amount of data via MISO. Is that MISO data from the slave available to an FX3 application? The     CyU3PSpiReceiveWords     appears to initiate a separate transaction for reading. This implies that the data that had been previously consumed in the Transmit activity would be lost. Or does Receive actually have access to the previous MISO data?   

 

   

When the FX3 initiates an SPI write via

   

 

   

Thank you,

   

JohnR

0 Likes
1 Solution
Anonymous
Not applicable

Yes, the received data is available but TransmitWords currently doesn't store them. For now, you can use the SPI in DMA mode which lets you both send and receive data simultaneously.

   

 

   

See the CyU3PSpiSetBlockXfer(..) function in the API guide for details.

View solution in original post

0 Likes
4 Replies
Anonymous
Not applicable

I just noticed that my previous post somehow got mangled, so I'm trying a re-post that (hopefully) will look a little more coherent.

   

 

   

I have a question on how the FX3 API handles SPI transactions.

   

When the FX3 initiates an SPI write via CyU3PSpiTransmitWords, the master FX3 sends data over MOSI,
and also consumes the same amount of data via MISO.    Is that MISO data from the slave available to
an FX3 application?   The CyU3PSpiReceiveWords appears to initiate a separate transaction for reading.  
This implies that the data that had been previously consumed in the Transmit activity would be lost.  
Or does Receive actually have access to the previous MISO data?

   

Thank you,

0 Likes
Anonymous
Not applicable

Yes, the received data is available but TransmitWords currently doesn't store them. For now, you can use the SPI in DMA mode which lets you both send and receive data simultaneously.

   

 

   

See the CyU3PSpiSetBlockXfer(..) function in the API guide for details.

View solution in original post

0 Likes
waxi_1305956
New Contributor

HI,

   

Can you give me a example that lets me bith send and receive data simultaneously?

0 Likes