English
Language : 

EZ-USB Datasheet, PDF (143/334 Pages) Cypress Semiconductor – The EZ-USB USB Integrated Circuit
7.3.11 Sync Frame
Byte
Field
0 bmRequestType
1 bRequest
2 wValueL
3 wValueH
4 wIndexL
5 wIndexH
6 wLengthL
7 wLengthH
Table 7-20. Sync Frame
Value
Meaning
0x82 IN, Endpoint
0x0C “Sync_Frame”
0x00
0x00
EP Endpoint number
0x00
2 LenL
0 LenH
8051 Response
Send a frame number over
IN0BUF to synchronize endpoint
EP
EP(n):
0x08-0x0F: OUT8-OUT15
0x88-0x8F: IN8-IN15
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 1 at the
same time (in the same frame).
To get in sync, the host issues the Sync_Frame request with EP=EP-OUT (byte 4). The
8051 firmware responds by loading IN0BUF 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 will initialize their sequence counters to 1. The 8051 reads
the current frame count in the USBFRAMEL and USBFRAMEH registers.
Multiple isochronous endpoints can be synchronized in this manner. The 8051 keeps sep-
arate internal sequence counts for each endpoint.
About USB Frames
The USB host issues a SOF (Start Of Frame) packet once every millisecond. Every SOF
packet contains an 11-bit (mod-2048) frame number. The 8051 services all isochronous
transfers at SOF time, using a single SOF interrupt request and vector. If the EZ-USB
core detects a missing SOF packet, it uses an internal counter to generate the SOF inter-
rupt.
Page 7-22
Chapter 7. EZ-USB CPU
EZ-USB TRM v1.9