AnsweredAssumed Answered

How do I throttle USB device transfers to the device?

Question asked by JOHN ADAMSON on Nov 8, 2014
Latest reply on Jan 8, 2015 by JOHN ADAMSON

Sorry for what may be a simple question...I'd have thought this was handled in the CDC examples, but if it's there, I couldn't find it.


I've got something that's essentially like a USB serial port, the host PC is transferring data that gets sent out a serial port at a relatively slow baud rate.  So given that the host can transfer data into my device faster than I can get rid of it, how do I tell the host not to send more data for a while, while my buffers empty?   I tried just delaying the call to USB_Class_MIDI_Recv_Data, thinking that would hold off some ACK, but no, I just lose data packets.


This is under MQX 4.0, using the USB device framework.  It's not actually a CDC, but I've made my own class that seems to work until I throw large amounts of data at it all at once.