You cannot create 2 DMA channels using same producer ports. for this kind of implementation you can create a GPIF to USB Manual channel., and the other CPU to S-port (the CPU is responsible to copy the same data to this channel).
The other way is to create a CY_U3P_DMA_TYPE_MULTICAST DMA channel. We have provided one example in USBBulkLoopMulticast firmware in the FX3 SDK. Please check. Let us know for further clarification.
Thank you for your quick response.
Yes, I already saw the CY_U3P_DMA_TYPE_MULTICAST which involve to use a manual DMA channel. That is why I was asking if there was another way to work with the same producer and 2 consumers with automatic DMA channel.
Would it take lots of CPU resources to do this copy from CPU to S-Port?
You cannot associate 2 channels with one port, we cannot suggest any other way to do the same. Yes, it will consume some of CPU resource, we do not have recorded/documented this data, but it mostly depends on your application. You can check what you get in your case
For us too, write data from GPIF II to Storage Port(through FatFs) and USB simultaneously. Earlier we have done with MANUAL IN to write on storage port using Fatfs, now we need to push to USB too.
For this what I did was created MANUAL CHANNEL here, the consumer is CY_U3P_UIB_SOCKET_CONS_1 and registered a callback function, once DMA event notification hits the callback func, I tried to send an even from that callback, but am not able to receive the event in another thread and also no error and call back hits up to 8 times because my DMA buff count is 8.
In DMA MANUAL CHANNEL configuration can we send the events or send Q to other threads.?