Each FX3 endpoint is asscoiated with a socket number.
When you create a DMA channel, you will specify the Producer and Consumer sockets (dmaCfg.prodSckId, dmaCfg.consSckId) for that channel. For an endpoint, first you need to configure it using CyU3PSetEpConfig() API and then you can specify the corresponding endpoint socket number (defined in CyU3PDmaSocketId_t) while creating the DMA channel.
That is why when you change the endpoint number in endpoint configuration, the communication stops.
Thank you. I have further questions.
dmaCfg.prodSckId and dmaCfg.consSckId are not ep_num. How do these values associate with each other?
I guess UIB socket binds the ep_num, because in the application note. The two created DMA channel have UIB socket of 0x0401 and 0x0301. The lower byte is 0x01 which means the channels are created for endpoint1.
Please give a remark on my understanding. Thank you.