Hello,
I have a Cypress FX2 based device with customer firmware. There is EP6 that is configured as AUTOIN=0. The FX2 is itself is configured as a slave device with internal master. within the poll() loop the code regulary checks if the internal state of the device has changed. If yes then it sends out 4 bytes of statuses onto the EP6FIFOBUF. (IN data, EP6 is configured as a INT pipe).
My problem is as follows:
I need to NAK every incoming IN request until I have anything at all to send out (SIE level) - I would assume that this is done by the SIE autmatically (if the FIFO is empty, all reads are NAKed), but this is not the case at all, no NAK is seen by our USB sniffer. If I set the EP6BCL to zero, then a zero length transfer goes out, however after that I am unable to send ANYTHING (not zero length) on that EP. If I send all the time 4 bytes of statuses, then the whole device works fine. I need to strip the USB communication, otherwise it will hog the CPU quite a lot (the PC based driver is a Windows KMDF driver, that automatically polls this endpoint and does it quite fast, doesn't seem to treat the polling interval fine).
I also tried to set INPKTEND to 0x06 or 0x86 without any luck. I am just UNABLE to see NAK on the USB level.
How should this be done? Thanks,