4 Replies Latest reply on Oct 11, 2018 2:33 AM by DaGi_900591

    Terminating a USB bulk OUT transfer


      I am a USB device. My host is sending me a large amount of data. But I've read everything I need, so I need to tell it to stop. How?


      Simply disabling the endpoint won't work, because the host will assume I'm busy and will just keep waiting for me to reenable the port. If it waits long enough, it'll time out, but that's a lousy user experience and I don't want to do that.


      The USB spec talks about stalling the endpoint to indicate an error condition, but I can't find any API to do this in the Cypress code. Plus, this isn't really an error condition, just an end of file. I did try this:




      ...but it just caused the entire USB connection to crash and burn as everything got out of sync.


      What I can't do is tell the host upfront how much data to send, because I don't know (this all depends on external hardware). So what should I be doing?