阅读:1369回复:2
菜鸟请教68013的基础问题
要用68013做个数据采集系统,正处于构想阶段。
Pipe: 0 Type: BLK Endpoint: 1 OUT MaxPktSize: 0x40 Pipe: 1 Type: BLK Endpoint: 2 IN MaxPktSize: 0x200 Pipe: 2 Type: BLK Endpoint: 8 IN MaxPktSize: 0x200 pipe 0 用于发送控制指令 pipe 2 用于读取传输数据 BLK Endpoint 2 拟用于Endpoint 8 IN 和 A/D 之间的中转buffer,防止数据丢失。 1,当描述部分没有定义端点2时,如下 Pipe: 0 Type: BLK Endpoint: 1 OUT MaxPktSize: 0x40 Pipe: 2 Type: BLK Endpoint: 8 IN MaxPktSize: 0x200 端点2的buffer是否能作为一个fifo使用? 可否将EP2,4,6所有的buffer当作一个可连续访问的fifo? 2,即使定义了 Pipe: 1 Type: BLK Endpoint: 2 IN MaxPktSize: 0x200 这512B也不够用,能否将EP2定义得更大?如手册1-23页图示那样,EP2看起来有3×1KB大, Pipe: 1 Type: BLK Endpoint: 2 IN MaxPktSize: 0x0c00 //3×1024 上述定义是否有效? 下面一段和1-23页图示始终理解不透,请哪位大侠讲解一下。 Endpoints 2, 4, 6 and 8 are the large, high bandwidth, data moving endpoints. They can be configured various ways to suit bandwidth requirements. The shaded boxes in Figure 1-15 enclose the buffers to indicate double, triple, or quad buffering. Double buffering means that one packet of data can be filling or emptying with USB data while another packet (from the same endpoint) is being serviced by external interface logic. Triple buffering adds a third packet buffer to the pool, which can be used by either side (USB or interface) as needed. Quad buffering adds a fourth packet buffer. Multiple buffering can significantly improve USB bandwidth performance when the data supplying and consuming rates are similar, but bursty; it smooths out the bursts, reducing or eliminating the need for one side to wait for the other. 这里的双缓冲,三缓冲,四缓冲究竟是什么意思? 2 4 6 8端点的MaxPacketSize究竟能定义多大?512?1024还是可以更大? 脑子里一团浆糊,请各位大侠不要笑话,耐心解惑,不胜感谢! |
|
沙发#
发布于:2004-12-28 15:45
正确的描述:
********************************* Endpoint Descriptor 0 -------------------------------- bLength: 0x7 bDescriptorType: 5 bEndpointAddress: 0x1 bmAttributes: 0x2 wMaxPacketSize: 64 bInterval: 0 ********************************* Endpoint Descriptor 1 -------------------------------- bLength: 0x7 bDescriptorType: 5 bEndpointAddress: 0x82 bmAttributes: 0x2 wMaxPacketSize: 512------------------------ok 1 bInterval: 0 ********************************* Endpoint Descriptor 2 -------------------------------- bLength: 0x7 bDescriptorType: 5 bEndpointAddress: 0x88 bmAttributes: 0x2 wMaxPacketSize: 512 bInterval: 0 ********************************* Get PipeInfo Interface Size 76 Pipe: 0 Type: BLK Endpoint: 1 OUT MaxPktSize: 0x40 Pipe: 1 Type: BLK Endpoint: 2 IN MaxPktSize: 0x200------ok 1 Pipe: 2 Type: BLK Endpoint: 8 IN MaxPktSize: 0x200 ********************************* Endpoint Descriptor 0 -------------------------------- bLength: 0x7 bDescriptorType: 5 bEndpointAddress: 0x1 bmAttributes: 0x2 wMaxPacketSize: 64 bInterval: 0 ********************************* Endpoint Descriptor 1 -------------------------------- bLength: 0x7 bDescriptorType: 5 bEndpointAddress: 0x82 bmAttributes: 0x2 wMaxPacketSize: 1024------------------------------------------ok 2 bInterval: 0 ********************************* Endpoint Descriptor 2 -------------------------------- bLength: 0x7 bDescriptorType: 5 bEndpointAddress: 0x88 bmAttributes: 0x2 wMaxPacketSize: 512 bInterval: 0 ********************************* Get PipeInfo Interface Size 76 Pipe: 0 Type: BLK Endpoint: 1 OUT MaxPktSize: 0x40 Pipe: 1 Type: BLK Endpoint: 2 IN MaxPktSize: 0x400------ok 2 Pipe: 2 Type: BLK Endpoint: 8 IN MaxPktSize: 0x200 |
|
板凳#
发布于:2004-12-28 15:46
不合适的描述,但是结果有些奇怪:
********************************* Endpoint Descriptor 0 -------------------------------- bLength: 0x7 bDescriptorType: 5 bEndpointAddress: 0x1 bmAttributes: 0x2 wMaxPacketSize: 64 bInterval: 0 ********************************* Endpoint Descriptor 1 -------------------------------- bLength: 0x7 bDescriptorType: 5 bEndpointAddress: 0x82 bmAttributes: 0x2 wMaxPacketSize: 2048-----------------------?3 bInterval: 0 ********************************* Endpoint Descriptor 2 -------------------------------- bLength: 0x7 bDescriptorType: 5 bEndpointAddress: 0x88 bmAttributes: 0x2 wMaxPacketSize: 512 bInterval: 0 ********************************* Get PipeInfo Interface Size 76 Pipe: 0 Type: BLK Endpoint: 1 OUT MaxPktSize: 0x40 Pipe: 1 Type: BLK Endpoint: 2 IN MaxPktSize: 0x0 ------?3 Pipe: 2 Type: BLK Endpoint: 8 IN MaxPktSize: 0x200 ********************************* Endpoint Descriptor 0 -------------------------------- bLength: 0x7 bDescriptorType: 5 bEndpointAddress: 0x1 bmAttributes: 0x2 wMaxPacketSize: 64 bInterval: 0 ********************************* Endpoint Descriptor 1 -------------------------------- bLength: 0x7 bDescriptorType: 5 bEndpointAddress: 0x82 bmAttributes: 0x2 wMaxPacketSize: 3072------------------------?4 bInterval: 0 ********************************* Endpoint Descriptor 2 -------------------------------- bLength: 0x7 bDescriptorType: 5 bEndpointAddress: 0x88 bmAttributes: 0x2 wMaxPacketSize: 512 bInterval: 0 ********************************* Get PipeInfo Interface Size 76 Pipe: 0 Type: BLK Endpoint: 1 OUT MaxPktSize: 0x40 Pipe: 1 Type: BLK Endpoint: 2 IN MaxPktSize: 0x800------?4 Pipe: 2 Type: BLK Endpoint: 8 IN MaxPktSize: 0x200 |
|