HS_USB 2.0 device
RM0082
466/844
Doc ID 018672 Rev 1
), which are mapped into the address space of the global control and status
registers (CSRs,
Section 23.3.6: Control and status registers
).
Interrupt (IRQ24) issued will be the OR of all active events defined above, plus the plug
detect interrupt.
23.3.3 SOF
tracker
The USB host sends start-of-frame (SOF) packets to USB 2.0 device every 1 ms for full-
speed (FS) operation, and every 125 µs for high-speed (HS) operation. Each SOF token
represents the start of every frame (for FS) or micro-frame (for HS) respectively, in case of
isochronous (ISO) data synchronization.
The start-of-frame (SOF) tracker block within the UDC-AHB subsystem is intended to track
any incoming SOF packets from the USB Host. With this aim, the SOF tracker runs internal
frame counters according to the operation rate (that is, 1 ms for FS and 125 µs for HS).
When a SOF packet is received from the USB Host, the UDC gets the 11 bit frame number
from the packet, and gives it to the back end within a single clock pulse, indicating the
reception of a SOF token.
In contrast, if a missing SOF packet is detected, the SOF tracker generates an event that is
used by the ISO in FIFOs to clear residual data from the previous frame, whereas UDC-AHB
subsystem moves to the next frame to provide synchronization.
In order to provide backward-compatibility with the FS 1 ms frame of USB 1.1, in HS mode
the frame number is incremented by UDC once every eight 125 µs micro-frames only. As a
consequence, the SOF tracker module generates the correct 14 bit micro-frame number by
adding a 3 bit micro-frame counter (operated by the SOF tracker itself) to the 11 bit frame
number provided by the UDC.
Note:
In order to provide backward-compatibility with the FS 1 ms frame of USB 1.1, in HS mode
the frame number is incremented by UDC once every eight 125 µs micro-frames only. As a
consequence, the SOF tracker module generates the correct 14 bit micro-frame number by
adding a 3 bit micro-frame counter (operated by the SOF tracker itself) to the 11 bit frame
number provided by the UDC.
23.3.4
Receive FIFO controller
All out endpoints (dedicated to transactions coming from the USB Host) share a common
receive FIFO (RxFIFO), which is managed by multiple
receive FIFO controller
. In particular,
the RxFIFO provides the UTLI with enough space to either accept the incoming packet from
the USB Host or send a NYET (UDC20 only) or a NAK handshake packet.
In particular, the RxFIFO consists of two individual FIFOs, one for the data and one for the
addresses. As depicted in
, the data FIFO is implemented as RAM, whereas the
address FIFO is implemented using registers. Each 32 bit wide entry in the address FIFO
corresponds to a received out packet, and it is associated to both the destination endpoint
number and a flag to distinguish regular data from the 8 bytes of SETUP data.
Note:
The total data FIFO size is 4KB. Out of the 37 bits wide data 32 bits is OUT/IN data and rest
5 bits is status information. For RxFIFO the maximum depth of address FIFO is 4, hence at
a given time maximum 4 OUT packets can be accommodated simultaneously. The depth of
the data RXFIFO is limited to 2kB. So during simultaneous storing of 4 OUT packet, each
packet would not be more than 512 bytes. But if OUT packets are of 1024 bytes (maximum
size) then only two OUT packets can be accommodated. Hence number of OUT packet