You are here

Ack is not received from firmware | Cypress Semiconductor

Ack is not received from firmware

Summary: 1 Reply, Latest post by aasi on 27 Jan 2012 07:11 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
Nazila's picture
55 posts


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.


aasi's picture
Cypress Employee
1166 posts

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



Log in to post new comments.