- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone
data flow
pc->>usocket----->>>dma---->>>psockets----GPIF----
FLAGA is dedicated to thread0 ,Flagb is dedicated to thread1,Flagc is dedicated to theread2,and so on.
part code
fx3_DmaCallback_EP2 (....)
void fx3_DmaCallback_EP2 (
CyU3PDmaChannel *chHandle,
CyU3PDmaCbType_t type,
CyU3PDmaCBInput_t *input)
{
//uint16_t index;
CyU3PDmaBuffer_t buf_p,inBuf_p,outBuf_p;
CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
if (type == CY_U3P_DMA_CB_PROD_EVENT)
{
// for debug
status = CyU3PDmaChannelGetBuffer(chHandle,&inBuf_p,CYU3P_NO_WAIT);
status = CyU3PDmaChannelCommitBuffer (chHandle, input->buffer_p.count, 0);
...............................
}
I used CyU3PDmaChannelGetBuffer() API to find data form pc..the CyU3PDmaChannelCommitBuffer () function is return success. my question is why was not the FLAGC signal change
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As you mentioned in your post, Flag C indicate the status of the Thread 2.
And this is on the GPIF side. It is nothing to do with the endpoint number.
I would like to see how you created a DMA channel between U-port and the GPIF side.
Thanks,
sai krishna.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
thanks your reply
The code of Creating channel is below
dmaCfg.size =64;
dmaCfg.count = CY_FX_FW_DMA_BUF_COUNT;
dmaCfg.prodSckId = CY_U3P_UIB_SOCKET_PROD_2 ;
dmaCfg.consSckId = CY_U3P_PIB_SOCKET_2;
dmaCfg.notification = CY_U3P_DMA_CB_PROD_EVENT;
dmaCfg.cb = fx3_DmaCallback_EP2;
apiRetStatus = CyU3PDmaChannelCreate (&gDMAChn_EP0x02_PSOCKET2, CY_U3P_DMA_TYPE_MANUAL, &dmaCfg);
if (apiRetStatus != CY_U3P_SUCCESS)
{
fx3_debug_print ("CyU3PDmaChannelCreate failed, Error code = %d\n", apiRetStatus);
fx3_error_handler(apiRetStatus);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I used project in the accessory.please help me check it out.
thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I used project in the accessory.please help me check it out.
thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
sorry
my project in the accessory is not post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you try the following thing:
Comment out the CyU3PDmaChannelGetBuffer;
if (type == CY_U3P_DMA_CB_PROD_EVENT)
{
// for debug
/* status = CyU3PDmaChannelGetBuffer(chHandle,&inBuf_p,CYU3P_NO_WAIT); */
status = CyU3PDmaChannelCommitBuffer (chHandle, input->buffer_p.count, 0);
...............................
}
Now you can try sending the data to EP2 from the host PC connected to FX3. Check the flag status in this case.
Thanks,
sai krishna.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
thanks your reply
I try it again.