Tool/software:
I am in a scenario where I need to stream back data as fast as possible. But during this blast of data it appears as though the usb buffer goes from max space available(1024 bytes) to 0 space available almost instantly and stays with 0 space available until I am done trying to send data back( up to 360S later). Here is my hardware set up. I have a master controller module that is connected to a PC via usb, there is a downstream slave module that is connected to the master controller via uart. I have the slave module doing data collection and sending back the results to the master controller. I can see that the data is getting back to the master fine and I can see that the master then transfers that data from the uart buffer to the usb buffer, but at some point, usually within a few second, when I go to send the data back to the PC, the master controller stops sending data. I have done some debugging and tracked it down to the USBWRITEBUFFER command call. I found that at that point there doesnt seem to be any room left of the buffer and so no data gets sent back. The master controller remains in this state, with no room on the usb buffer, until the slave module stops sending uart packets back. I have done some timing analysis and it looks like there is about 120uS between each packet being recieved on uart by the master controller. right now each packet is 8 Bytes long. it seems like that should be plenty of time to copy from the uart buffer to the usb buffer and send the data back to the PC.