Warning: The magic method Math_Captcha::__wakeup() must have public visibility in /home/wwwroot/blog.gotocoding.com/wp-content/plugins/wp-math-captcha/wp-math-captcha.php on line 87

Warning: Cannot modify header information - headers already sent by (output started at /home/wwwroot/blog.gotocoding.com/wp-content/plugins/wp-math-captcha/wp-math-captcha.php:87) in /home/wwwroot/blog.gotocoding.com/wp-content/plugins/wp-math-captcha/includes/class-cookie-session.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at /home/wwwroot/blog.gotocoding.com/wp-content/plugins/wp-math-captcha/wp-math-captcha.php:87) in /home/wwwroot/blog.gotocoding.com/wp-content/plugins/wp-math-captcha/includes/class-cookie-session.php on line 49

Warning: Cannot modify header information - headers already sent by (output started at /home/wwwroot/blog.gotocoding.com/wp-content/plugins/wp-math-captcha/wp-math-captcha.php:87) in /home/wwwroot/blog.gotocoding.com/wp-content/plugins/wp-math-captcha/includes/class-cookie-session.php on line 49

Warning: Cannot modify header information - headers already sent by (output started at /home/wwwroot/blog.gotocoding.com/wp-content/plugins/wp-math-captcha/wp-math-captcha.php:87) in /home/wwwroot/blog.gotocoding.com/wp-content/plugins/wp-math-captcha/includes/class-cookie-session.php on line 49

Warning: Cannot modify header information - headers already sent by (output started at /home/wwwroot/blog.gotocoding.com/wp-content/plugins/wp-math-captcha/wp-math-captcha.php:87) in /home/wwwroot/blog.gotocoding.com/wp-content/plugins/wp-math-captcha/includes/class-cookie-session.php on line 49

Warning: Cannot modify header information - headers already sent by (output started at /home/wwwroot/blog.gotocoding.com/wp-content/plugins/wp-math-captcha/wp-math-captcha.php:87) in /home/wwwroot/blog.gotocoding.com/wp-content/plugins/wp-math-captcha/includes/class-cookie-session.php on line 49

Warning: Undefined array key "action" in /home/wwwroot/blog.gotocoding.com/wp-content/plugins/wp-recentcomments/core.php on line 7

Warning: Undefined array key "action" in /home/wwwroot/blog.gotocoding.com/wp-content/plugins/wp-recentcomments/core.php on line 12
关于USB微帧与数据包包长与端点缓冲区的理解 | 重归混沌的BLOG

关于USB微帧与数据包包长与端点缓冲区的理解

       搞了这么久USB了,还是不知道DATA0,DATA1的最大包长,以及端点描述符中的最大包长与68013的端点缓冲区有什么关系,经过二小时的奋斗得出如下结论:
       1.DATA0或DATA1实际上就是一个端点描述符中的最大包长。换句话说,68013发一次数据包就是一个DATA0或             DATA1

2.微帧是用来作为传输时间基准的。在每个微帧间可以传一到多次DATA0/DATA1,但是根据DATA0/DATA1(也就是68013一次发送的数据的长度)的大小,每个微帧之间可以传送DATA数据包的个数也不同,DATA0/DATA1越大,每个微帧之间能传输的DATA的数据包的个数越少。

3.在USB2.0之中限定了描述符中的最大包长,是因为在一个微帧内由于物理条件的限制(物理带宽、bit率的原因),只能传输那么多。

4.固件使用的USB协议其实就是用来与上位机驱动进行通信的一种语言。换句话说,里面的描述符中的内容都是给上位机驱动看的。其中端点中的最大包长也就是指的是,硬件的端点缓冲区。如果端点缓冲区比描述符中的最大包长小(在USB2.0协议最大包长范围之内),那么USB硬件接收到的数据在一定情况下将会被截断或者不被接收,如果端点缓冲区比描述符中的最大包长大(在USB2.0协议最大包长范围之内),端点缓冲将会被浪费。

发表评论

− four = three