Cypress Semiconductor FX2LP Technické informace Strana 77

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 460
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 76
Chapter 2. Endpoint Zero Page 2-23
2.3.10 Sync Frame
The
Sync Frame
request is used to establish a marker in time so the host and USB device can
synchronize multi-frame transfers over isochronous endpoints.
Suppose an isochronous transmission consists of a repeating sequence of five 300-byte packets
transmitted from host to device over EP8-OUT. Both host and device maintain sequence counters
that count repeatedly from 1 to 5 to keep track of the packets inside a transmission. To start up in
sync, both host and device need to reset their counts to “0” at the same time (in the same frame).
To get in sync, the host issues the
Sync Frame
request with EP=EP8OUT (0x08). The firmware
responds by loading EP0BUF with a two-byte frame count for some future time; for example, the
current frame plus 20. This marks frame “current+20” as the sync frame, during which both sides
initialize their sequence counters to “0.” The current frame count is always available in the USB-
FRAMEL and USBFRAMEH registers.
Multiple isochronous endpoints can be synchronized in this manner; the firmware can keep a sep-
arate internal sequence count for each endpoint.
Table 2-22. Sync Frame
Byte Field Value Meaning Firmware Response
0 bmRequestType
0x82
IN, Endpoint
Send a frame number over EP0
1 bRequest
0x0C
“Sync Frame”
to synchronize endpoint #EP
2 wValueL 0x00
3 wValueH 0x00
4 wIndexL
EP
Endpoint number
5 wIndexH 0x00
6 wLengthL 2 LenL
7 wLengthH
0
LenH
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 firm-
ware 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 microf-
rames. 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 mech-
anism for synchronizing on any other microframe.
Zobrazit stránku 76
1 2 ... 72 73 74 75 76 77 78 79 80 81 82 ... 459 460

Komentáře k této Příručce

Žádné komentáře