CyU3PMemCopy too slow

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi guys,

I run the sample code "USBBlukStreams" in cyusb3014 DVK with PC's full speed USB port. The speed that send data to PC is able to up to 40MB/S. When I add "CyU3PMemCopy(buf_p.buffer,gpBuffer,buf_p.size);"  in callback "CyFxBulkStreamsDmaCallback ", the transfer speed drop down to 11MB/S. gpBuffer is allocated by CyU3PMemAlloc in function "BulkStreamsAppThread_Entry". Is there any way to speed up CyU3PMemCopy?  Any suggestion is appreciated. Thanks !

0 Likes
1 Reply
Anonymous
Not applicable

 There's no way to speed this up. If your data source is from another peripheral (i.e GPIF, SPI etc), then create a DMA channel from that socket to your USB socket.

   

 

   

However, if CPU is the data source, there's really not much you can do to speed it up. If the data being sent doesn't change, then you can load the buffers once and then just re-commit each time the buffer is sent out (like how BulkSourceSink does it).

0 Likes