There are two reasons why a CyU3PDmaChannelCreate (or CyU3PDmaMultiChannelCreate) API returns the CY_U3P_ERROR_MEMORY_ERROR code.
- DMA buffer allocation failure
- DMA buffer descriptor allocation failure: The buffer descriptors are structures that keep track of the size and state of each DMA buffer. There are a total of 512 descriptors available on the system. Each buffer requires one descriptor in the case of AUTO channels, and two descriptors in the case of MANUAL channels.
In your case, the attempt to create a multichannel with a count of 252 would fail because the a MANUAL multichannel with a count of 252 will require 1008 descriptors. There is no dependency on the USB connection speed. We have verified that we are able to create DMA channels with a count 126 in both 2.0 and 3.0 cases.
This makes sense. So I will increase the DMA buffer size to get around this problem. Thanks for letting me know.