cancel
Showing results for 
Search instead for 
Did you mean: 

USB OTG HS bandwidth

anhdv
Associate

Hi everyone,

I'm developing a USB OTG Highspeed using STM32F756ZG with USB3340 USB PHY.

Currently I'm using two OUT endpoint (EP1 and EP2), the host PC send each request (EP1 --> EP2 --> EP1 --> EP2 and so on). I got a problem when I try to send a request too fast (200us period), at that time the USB device only receive 1 endpoint in "OTG_HS_IRQ Handler" interrupt despite of the host PC send both EP1 and EP2.

I have a few question, can anyone explain to me:

1. Following the reference manual of STM32F756, it say "It guarantees max USB bandwidth for up to one frame (1ms) without system intervention". My understanding is USB can not handle if two request is send faster than 1ms. Is it correct?

anhdv_0-1748919233891.png

 

2. If the PC need to transfer very fast, how I can prevent this problem. I have checked some document and it say that the host PC need to check NAK request but I wonder it already have in USB device or not.

Thank all.

 

1 REPLY 1
FBL
ST Employee

Hi @anhdv 

This statement refers to the USB Full-Speed device's ability to handle data transfers autonomously for a single USB frame (1ms in USB FS) without requiring intervention from the MCU's firmware. 

How it works?

The host schedules transactions (IN, OUT, or control transfers) within this frame and devices must respond to requests within the allocated bandwidth. Devices are expected to queue and process these transactions using endpoint buffers.

Now, If a device cannot accept data or has no data to send, it issues a NAK handshake. The host retries the transaction later.

The statement that a USB device can handle multiple transactions within a single frame is supported by the USB specification and the way USB operates. Check USB2.0 protocol specification for more details. 

You can use protocol analyzer that demonstrates how the host schedules transactions and how devices respond.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.