Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Ack is not received from firmware

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



Ack is not received from firmware
Moderator:
RSKV

Post Reply
Follow this topic



Ack is not received from firmware

Nazila posted on 26 Jan 2012 3:07 PM PST
Top Contributor
55 Forum Posts

Hi,

In my design I have an IN and an OUT interrupt endpoint (EP1IN and EP1OUT). After the transmission of each data block to the CYUSB3014, software waits for an acknowledgement which is a 2-byte data (=A1 01). In the software, I am using the asynch transmission (The software worked fine with the FX2LP):
 

unsigned char* inContext = usb->BeginDataXfer(buffer, messageSize, &inOverlap);

usb->WaitForXfer(&inOverlap, timeOut);

usb->FinishDataXfer(buffer, messageSize, &inOverlap, inContext);

 
--------------------------------------------
In firmware, inside the DmaCallBack function, I am using:

/* Wait for a free buffer */

apiRetStatus = CyU3PDmaChannelGetBuffer (&glChHandleIntrOut, &outBuf_p, CYU3P_WAIT_FOREVER);

CyU3PMemSet (outBuf_p.buffer, command, 1); // command = 0xA1
CyU3PMemSet (outBuf_p.buffer+1, 0x01, 1);

/* Now discard the data from the producer channel */

apiRetStatus = CyU3PDmaChannelDiscardBuffer (chHandle);
 
/* commit the buffer */

apiRetStatus = CyU3PDmaChannelCommitBuffer (&glChHandleIntrOut, 2, 0);

 
---------------------------------------------
 
The issues are:
1. I can receive the correct ack (0xA1 01) when using the Control Center (regardless of the number of commited bytes).
2. In the software, it is not receiving any data, otherwise I increase the number of commited bytes as
    
     CyU3PMemCopy (outBuf_p.buffer+2, input->buffer_p.buffer, 4); // write some dummy words
 
     apiRetStatus = CyU3PDmaChannelCommitBuffer (&glChHandleIntrOut, 6, 0);
 
3. When I omit the codes in (2), or decrease the number of dummy bytes, software does not receive any data
 
4. However, when I commit 6 or more number of bytes, the software receive them (I can see them in the memory), but the message length in FinishDataXfer becomes 0.
 
I would appreciate it if you could help me solve this problem.
 
Thanks,

Nazila




Re: Ack is not received from firmware

aasi posted on 27 Jan 2012 05:11 AM PST
Cypress Employee
1073 Forum Posts

Please create a tech support case (MyAccount -> MyCases) so that one of our engineers can help you with this.

Regards,

Anand






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.