I am trying to use CX3 as an USB_UART bridge to send incoming SPI data to host PC. Following are the paths.
1) SPI to CX3 Manual IN DMA (Incoming data)
2) CX3 to USB Manual OUT DMA (Outgoing data towards Host PC) (Bulk)
The time taken for reading from SPI to CX3 using DMA is approx. 4 ms for 256 bytes (My SPI clock is 512 kHZ). The time taken for transferring the data from CX3 to USB takes approx. 9.8 ms (for same 256 bytes).
Im losing data because of higher CX3 to USB serial latency compared to SPI counterpart . Is there any way to increase the throughput of this bulk transfer such a way that the time taken is always much lesser than the incoming SPI speed.
Attaching the project
Can you try by increasing the number of DMA buffers and see if that helps. I see that you are using 32 bytes buffer, so you have a lot of scope to increase the number of DMA buffers.