This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cypress-FX2: How to change number of bytes sent to host?

Dear all,

I want to program a Cypress FX2 firmware which bases on this HID firmware sample
http://www.lvr.com/files/fx2hid.zip

In the original sample, the device sends only two bytes to the host. I want to send more than that, let's say: 5 bytes
So my code in the TD_Poll is:

EP1INBUF[0] = EP1OUTBUF[0];
EP1INBUF[1] = EP1OUTBUF[1];
EP1INBUF[2] = 2;
EP1INBUF[3] = 3;
EP1INBUF[4] = 4;

// Rearm the IN endpoint buffer to enable sending a report.
// The value equals the report size.
EP1INBC = 5;

// usbhidiocode end
EP1OUTBC = 0;

However when I run the host application http://www.lvr.com/files/usbhidioc2.zip

It always returns Capabilities.InputReportByteLength =3
and after several data exchange between host and device, the program at host hangs.

Please advise me how to change the number of bytes sent to host correctly?

Thanks
Delrina Chang,

0