rt1052 USB 传输速度慢

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

rt1052 USB 传输速度慢

2,792 次查看
wandongli
Contributor I

因为项目需要所以我使用SDK2.5 提供HID的参考历程进行了修改,修改为自定义设备。设备描述符的主要信息如下:

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

其中主要的修改为,将端点类型修改为bulk 模式传输。

我使用Libusb 进行上位机的开发,PC端一直读,发现速度很慢,如下:

pastedImage_4.png

PC 一直读的时候,设备端使用for一直发送如下:

pastedImage_5.png

其中一直读的时候整体的速度很慢,请教一下是我设备端发送数据的方式不对吗?导致发送很慢。

标签 (1)
0 项奖励
回复
3 回复数

2,614 次查看
wandongli
Contributor I

HI 

     如你所说,我去掉printf的输出确实快很多,但是任然没有达到我预期的速度,我应该怎样做可以进一步的提高速度呢?另外请问一下我这样通过for的方式一直发是否可行,是否有更加可靠且快速的响应PC一直读的操作方法呢 ?

0 项奖励
回复

2,614 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Bulk传输最大包大小设置为64字节,通过while()循环应该会快一些。


Have a great day,
Mike

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复

2,614 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Please mask the printf function within the while loop and try.

Wish it helps.


Have a great day,
Mike

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复