Configuration of isochronous transfers using USB bare metal SDK

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Configuration of isochronous transfers using USB bare metal SDK

3,527件の閲覧回数
rick_weil
Contributor I

In my i.MX6 project, I'm transferring video data using USB isochronous transfers (with the bare metal SDK).  I'm unable to transfer data fast enough to keep up, but since I'm using USB 2.0 HS, I should theoretically be able to get up to 24MB/s (4MB/s should be fast enough for my purposes).  Upon examination with a USB bus analyzer, I see that after receiving a SOF, I transfer 3072 bytes.  Then 31 SOFs are received with no reply.  Then another 3072 byte transfer.

So I believe the device is not fully utilizing the bandwidth it has been given.  I don't see how to configure the transfer to use all 8 microframes. Or for that matter, how to use all available SOFs for which the device has data ready to transmit.  Not even sure this is a host or device configuration.

Any pointers would be appreciated.

Thanks,

Rick

ラベル(2)
タグ(1)
0 件の賞賛
返信
3 返答(返信)

3,304件の閲覧回数
CarlosCasillas
NXP Employee
NXP Employee

Hi Rick,

From USB 2.0 High Speed specifications is mentioned that the maximum packet size for Interrupt and Isochronous transfers is 1024 bytes with 3 maximum guaranteed packets:

https://beyondlogic.org/usbnutshell/usb4.shtml

So, the 3072 bytes that you are seeing are the three maximum guaranteed 1024-bytes packets of HS Isochronous transfers.

However, the proper configurations to use all microframes to achieve up to the theoretical 24 MBps (in Isochronous transfers) is dependent of the USB stack, so, if you are using a bare-metal sdk, you will need to contact the provider of such sdk.

You could also take a look to the following document for reference:

https://www.nxp.com/docs/en/application-note/AN4589.pdf


Hope this will be useful for you.
Best regards!
/Carlos
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
-------------------------------------------------------------------------------

0 件の賞賛
返信

3,304件の閲覧回数
rick_weil
Contributor I

Hi Carlos,

The information you provided was helpful to me mostly in confirming my understanding USB transactions.

Further digging into the my bandwidth problem now has me now wondering if the transfer rates I'm seeing may be limited in another way.  I have 2 isochronous endpoints... one devoted to video (endpoint 2), the other to a low speed status channel (endpoint 3). The host polls the video channel for 2 frames, then the status endpoint.  This pattern repeats forever.  Is there a way to limit requests for EP3 to every 100 msec, allowing more USB bandwidth to be devoted to EP2?  How does the host controller determine that it should devote 2 of every 3 frames to the video?

Thanks,

Rick

0 件の賞賛
返信

3,304件の閲覧回数
CarlosCasillas
NXP Employee
NXP Employee

Hi Rick,
In case that your application requires a low speed status channel polled each 100 ms, you could consider using a Interrupt endpoint (configured to 100ms period).


Hope this will be useful for you.
Best regards!
/Carlos
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
-------------------------------------------------------------------------------