Transfers between EP0 and PIB socket

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

cross mob
Anonymous
Not applicable

Hello everyone! I want to transfer data to PIB socket both from Bulk In endpoint (EP1) and control endpoint (EP0). Is it real to do this? 

0 Likes
1 Solution
Anonymous
Not applicable

Hi,

When CyU3PUsbStart() API is called, two internal DMA channels are setup; CPU PROD->EP0 IN and EP0 OUT-> CPU CONS. Since, the same socket cannot be used in two DMA channels (except for CPU sockets), you cannot create a DMA channel from EP0 to PIB socket.

You can create a DMA channel from BULK IN EP to PIB socket 0. You can create another DMA channel from CPU Producer to PIB socket 1. You need to use CyU3PUsbGetEP0Data() API to fetch the data sent on EP0 OUT into a buffer. Then, you need to copy this buffer content onto a DMA buffer corresponding to the DMA chanel : CPU PROD->PIB socket 1

View solution in original post

1 Reply
Anonymous
Not applicable

Hi,

When CyU3PUsbStart() API is called, two internal DMA channels are setup; CPU PROD->EP0 IN and EP0 OUT-> CPU CONS. Since, the same socket cannot be used in two DMA channels (except for CPU sockets), you cannot create a DMA channel from EP0 to PIB socket.

You can create a DMA channel from BULK IN EP to PIB socket 0. You can create another DMA channel from CPU Producer to PIB socket 1. You need to use CyU3PUsbGetEP0Data() API to fetch the data sent on EP0 OUT into a buffer. Then, you need to copy this buffer content onto a DMA buffer corresponding to the DMA chanel : CPU PROD->PIB socket 1