cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1

JaLe_2074191
New Contributor II

In the USB block and the method USBBULK_ReadOutEP, there is a comment about DMA with manual buffer management.

How do I check if the DMA is finished and/or where do I find the \snippet /USBFS_sut_02.cydsn/main.c checking EPstate code?

/*******************************************************************************

* Function Name: USBBULK_ReadOutEP

****************************************************************************//**

.......

*   *DMA with Manual Buffer Management:*

*   Configure DMA to transfer data from endpoint buffer to system RAM. Generate

*   a DMA request. The firmware must wait until the DMA completes the data

*   transfer after calling the USB4BULK_ReadOutEP() API. For example,

*   by checking EPstate:

*

*   \snippet /USBFS_sut_02.cydsn/main.c checking EPstate

*

0 Likes
1 Solution
JaLe_2074191
New Contributor II

Guess this is the correct solution....

while (USB_GetEPState(OUT_EP) != USB_OUT_BUFFER_FULL);

/*******************************************************************************

* Function Name: USB_GetEPState

****************************************************************************//

...

*  Return Value           | Description

*  -----------------------|-----------------------------------------------------

....

*  USBFS_OUT_BUFFER_FULL  |An OUT transaction has occurred and data can be read

View solution in original post

0 Likes
1 Reply
JaLe_2074191
New Contributor II

Guess this is the correct solution....

while (USB_GetEPState(OUT_EP) != USB_OUT_BUFFER_FULL);

/*******************************************************************************

* Function Name: USB_GetEPState

****************************************************************************//

...

*  Return Value           | Description

*  -----------------------|-----------------------------------------------------

....

*  USBFS_OUT_BUFFER_FULL  |An OUT transaction has occurred and data can be read

View solution in original post

0 Likes