The value in this register increments at the end of each time frame (microframe,
for example). Bits [N:3] are used for the Frame List current index. This means that
each location of the frame list is accessed eight times (frames or microframes)
before moving to the next index. The following illustrates values of N based on the
value of FLS (Frame List Size) in the UHPHS_USBCMD register.
UHPHS_USBCMD.FLS |
Number Elements |
N |
0 |
1024 |
12 |
1 |
512 |
11 |
2 |
256 |
10 |
3 |
Reserved |
– |
The SOF frame number value for the bus SOF token is derived or alternatively managed from this register. The value of FRINDEX must be 125 μs (1 microframe) ahead of the SOF token value. The SOF value may be implemented as an 11-bit shadow register. For this discussion, this shadow register is 11 bits and is named SOFV. SOFV updates every eight microframes (1 millisecond). An example implementation to achieve this behavior is to increment SOFV each time the FRINDEX[2:0] increments from 0 to 1.
Software must use the value of FRINDEX to derive the current microframe number,
both for high-speed isochronous scheduling purposes and to provide the “get
microframe number” function required for client drivers. Therefore, the value of
FRINDEX and the value of SOFV must be kept consistent if chip is reset or software
writes to FRINDEX. Writes to FRINDEX must also write-through FRINDEX[13:3] to
SOFV[10:0]. In order to keep the update as simple as possible, software should never
write a FRINDEX value where the three least significant bits are 7 or 0.