1 Reply Latest reply on Sep 18, 2014 5:54 AM by pavankumar.vibhute

    USB (manual memory management) maximum transfer size

    user_193124556

      I'm looking for some clarification on the maximum amount of data that can be transferred in a single USB_LoadInEP() call.

         

       

         

      The TRM states what the maximum packet size is in the various USB configuration modes, but that does not necessarily equate to an API call. I understand that in manual mode, the maximum packet size (wMaxPacket in the USB endpoint descriptor) is 64 bytes. Is it therefore safe to assume that the maximum amount of data that can be sent in a single USB_LoadInEP() call is whatever this value is set to? If I need to send more data, do I break up the data into multiple wMaxPacket chunks? i.e. can I get confirmation the API will *not* break up large transfers for me? If I'm sending *exactly* wMaxPacket bytes, do I have to send a zero length packet after sending wMaxPacket bytes?

        • 1. Re: USB (manual memory management) maximum transfer size
          pavankumar.vibhute

          According to spec, USB 2.0 Full speed device can have maximum packet as below.

             

           64 bytes - bulk endpoints

             

           64 bytes - interrupt endpoints

             

          1024 bytes - isoc endpoints

             

          Yes, you can send only wMaxPacket with USB_LoadInEP(). You can use DMA with automatic memory management mode where this API triggers DMA instead of manually copying data from memory to USB buffer. You don't need to send zero length packet.