Long pause before processing Setup Packet | Cypress Semiconductor
Long pause before processing Setup Packet
I am having an issue with a long delay between the Setup Packet coming in and SW getting into the function .
CyBool_t XXXXXApplnUSBSetupCB (uint32_t setupdat0, uint32_t setupdat1 )
On the first Setup packet that I get (8 Bytes SETUP packet, followed by a 16 byte payload), I get a few Naks after the first Setup packet as seen on CATC USB Analyzer, and then the 16 byte payload is ACKed. I then process the command, send some data over the GPIF to the EP6-IN which then gets pulled back to the host very nicely .
However, when I get the next Setup Packet with 16 byte payload, I get almost 199ms of NAKs before I get into the setup routine. I have proven that once I get into the interrupt routine, the time it takes to process the data is about 200 usecs. On a oscilloscope and Logic Analyzer. This happens for all of the following SetupPackets (thousands)
In the processing of the setup packet, I read 8 bytes of the payload first, and then once all of the data is processed, I get the remaining 8 bytes of data(which I don’t use) which will allow the status stage to go back to the PC. I return CyTrue to the system from the USBSetupCB function.
I am using cypress as the GPIF master mode.
Does anyone know why I am getting this 199msec pause before getting into my SetupCB routine?