USB (manual memory management) maximum transfer size

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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?

0 Likes
2 Replies
Anonymous
Not applicable

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. 

0 Likes

Full speed isochronous is 1023 bytes, not 1024.

The maximum data payload size allowed for low-speed devices is 8 bytes.

The maximum data payload size for full-speed devices is 1023.

The maximum data payload size for high-speed devices is 1024 bytes.

Section 8.4.4 Data Packets

0 Likes