yeahohoo
驱动牛犊
驱动牛犊
  • 注册日期2007-06-04
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分190分
  • 威望20点
  • 贡献值0点
  • 好评度19点
  • 原创分0分
  • 专家分0分
阅读:3488回复:6

[提问]SOF是怎么回事?

楼主#
更多 发布于:2007-07-02 10:46
我知道它每隔1ms发送一次,但SOF在usb协议中具体有什么作用?
求高手指点,详细一点!

还有,我看到一个驱动源码里面每隔250个SOF(1/4 秒)就会做一个动作,但是我不清楚具体含义,在usb标准中有什么关于250ms间隔的规定吗?

谢谢!!!!!

最新喜欢:

wingmanwingma...
wjt810907
驱动中牛
驱动中牛
  • 注册日期2004-08-18
  • 最后登录2011-04-16
  • 粉丝0
  • 关注0
  • 积分86分
  • 威望409点
  • 贡献值1点
  • 好评度402点
  • 原创分2分
  • 专家分0分
沙发#
发布于:2007-07-02 10:53
About USB Frames

In full-speed mode (12 Mbps), the USB host issues an SOF (Start Of Frame) packet once
every millisecond. Every SOF packet contains an 11-bit (mod-2048) frame number. The firmware
services all isochronous transfers at SOF time, using a single SOF interrupt request
and vector. If the FX2 detects a missing or garbled SOF packet, it can use an internal counter
to generate the SOF interrupt automatically.

In high-speed (480 Mbps) mode, each frame is divided into eight 125-microsecond microframes.
Although the frame counter still increments only once per frame, the host issues an
SOF every microframe. The host and device always synchronize on the zero-th microframe
of the frame specified in the device’s response to the Sync Frame request; there’s no mechanism for synchronizing on any other microframe.

mcu_boy
wjt810907
驱动中牛
驱动中牛
  • 注册日期2004-08-18
  • 最后登录2011-04-16
  • 粉丝0
  • 关注0
  • 积分86分
  • 威望409点
  • 贡献值1点
  • 好评度402点
  • 原创分2分
  • 专家分0分
板凳#
发布于:2007-07-02 10:56
Isochronous Endpoint Descriptor

This seven-byte descriptor defines the endpoint characteristics
as follows:
07H ;; Descriptor length
05H ;; Descriptor type
82H ;; Endpoint number2 and direction IN
01H ;; Endpoint type (Isochronous)
00H ;; Maximum packet size (LSB)
04H ;; Max packet size (MSB) 1 x 1024 byte packets/uFrame
01H ;;Polling interval.

The endpoint type is set to 0x01 for an isochronous endpoint.
Bytes four and five, which define the wMaxPacketSize field,
are set to 1024 bytes. As this is not a high-bandwidth endpoint
bits 12..11 in the wMaxPacketSize field of the endpoint
descriptor are set to 00 binary, indicating one packet per
microframe. The bInterval field, which is the polling interval,
is set to 1. This means that the host will poll this endpoint
once(2(1-1)) every frame when the device is operating at
high-speed.


Do you understand?
mcu_boy
yeahohoo
驱动牛犊
驱动牛犊
  • 注册日期2007-06-04
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分190分
  • 威望20点
  • 贡献值0点
  • 好评度19点
  • 原创分0分
  • 专家分0分
地板#
发布于:2007-07-02 14:15
thanks, cute worm~
i don't quite understand even after i read the specification about usb2.0
do you mean SOF is only used for Isochronous transfer ? or what ?
wjt810907
驱动中牛
驱动中牛
  • 注册日期2004-08-18
  • 最后登录2011-04-16
  • 粉丝0
  • 关注0
  • 积分86分
  • 威望409点
  • 贡献值1点
  • 好评度402点
  • 原创分2分
  • 专家分0分
地下室#
发布于:2007-07-02 18:42
not just for usb2.0, but only in 2.0 the interval can be set while it is 1 in usb1.0

the service intervel field of the interface description means how long the host can service for the specified pipe.
mcu_boy
hongk111222
驱动牛犊
驱动牛犊
  • 注册日期2007-06-25
  • 最后登录2007-08-06
  • 粉丝0
  • 关注0
  • 积分350分
  • 威望36点
  • 贡献值0点
  • 好评度35点
  • 原创分0分
  • 专家分0分
5楼#
发布于:2007-07-03 15:56
and provid a signal which make the device don't get into the suspend mode.
means keeps the bus alive
hongk111222
驱动牛犊
驱动牛犊
  • 注册日期2007-06-25
  • 最后登录2007-08-06
  • 粉丝0
  • 关注0
  • 积分350分
  • 威望36点
  • 贡献值0点
  • 好评度35点
  • 原创分0分
  • 专家分0分
6楼#
发布于:2007-07-03 15:57
250个SOF(1/4 秒)就会做一个动作?

is there anybody know it?
游客

返回顶部