Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > dma flag sigal is not change

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



dma flag sigal is not change
Moderator:
RSKV

Post Reply
Follow this topic



dma flag sigal is not change

MemoRight posted on 17 Sep 2012 12:51 AM PST
Senior Member
12 Forum Posts

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

 




Re: dma flag sigal is not change

RSKV posted on 17 Sep 2012 03:22 AM PST
Cypress Employee
655 Forum Posts

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.



Re: dma flag sigal is not change

MemoRight posted on 17 Sep 2012 03:49 AM PST
Senior Member
12 Forum Posts

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);
    } 



Re: dma flag sigal is not change

MemoRight posted on 17 Sep 2012 04:02 AM PST
Senior Member
12 Forum Posts

Hi

I used project in the accessory.please help me check it out.
thanks.

 



Re: dma flag sigal is not change

MemoRight posted on 17 Sep 2012 04:05 AM PST
Senior Member
12 Forum Posts

Hi

I used project in the accessory.please help me check it out.
thanks.

 



Re: dma flag sigal is not change

MemoRight posted on 17 Sep 2012 04:08 AM PST
Senior Member
12 Forum Posts

Hi

sorry

my  project in the accessory is not post.

 



Re: dma flag sigal is not change

RSKV posted on 17 Sep 2012 04:15 AM PST
Cypress Employee
655 Forum Posts

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.



Re: dma flag sigal is not change

MemoRight posted on 18 Sep 2012 11:51 PM PST
Senior Member
12 Forum Posts

Hi

thanks your reply

I try it again.






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.