cancel
Showing results for 
Search instead for 
Did you mean: 

How do I transfer data over 0x80000 from USB DEVICE?

mcho.19
Associate II

I made a High Speed USB DEVICE using USB PHY with STM32F207.

A data transmission test to the host is in progress, and transmission is possible up to the size of 0x7FFFF, but it cannot transmit more than that.

When referring to stm32f2xx_ll_usb.c, the maximum transfer size can be specified up to 0x7FFFF.

#define USB_OTG_DIEPTSIZ_XFRSIZ (0x7FFFFUL << 0U)

USBx_INEP(epnum)->DIEPTSIZ |= (USB_OTG_DIEPTSIZ_XFRSIZ & ep->xfer_len);

What should I do if I want to transmit more than 0x80000 data?

For example

Transmit data below 0x7FFFF -> Wait for transmission completion -> Transmit data below 0x7FFFF -> Wait for transmission completion -> ... -> Transmit the last data -> Wait for transmission completion -> Done

Is it possible to transmit only in this way?

1 ACCEPTED SOLUTION

Accepted Solutions

> Is it possible to transmit only in this way?

Yes.

At the end of the day, the actual transfers happen in maxpacket sizes, anyway.

JW

View solution in original post

2 REPLIES 2

> Is it possible to transmit only in this way?

Yes.

At the end of the day, the actual transfers happen in maxpacket sizes, anyway.

JW

Thank you for answer