CHAPTER 8 USB FUNCTION
User’s Manual U12978EJ3V0UD
122
8.5 USB Function Operation
8.5.1 USB timer operation
The USB timer is a 7-bit counter that performs time management during packet transmission and reception and
inadvertent program loop detection of the USB clock.
The USB timer has two modes: high-speed mode (source clock = f
X
) and low-speed mode (source clock = USB
clock: f
X
= 1.5 MHz during 6.0 MHz operation). In the high-speed mode, the USB functions as a 6-bit counter.
High-speed mode is used for time management during packet transmission and reception. The timer starts after
EOP reception or data packet EOP transmission. The start condition is set by the USB timer start reservation control
register (USBTCL).
Low-speed mode is used for detecting inadvertent program loops of the USB clock. The timer starts upon
detection of the SYNC signal of a receive packet, or upon reception of the USB reset or Resume signals.
When the USB timer overflows, an interrupt request signal (INTUSBTM) is generated, regardless of whether the
current mode is the high-speed or low-speed mode. When overflow of the USB timer occurs in the low-speed mode,
UWDERR (bit 7 of the packet receive status register (RXSTAT)) is set, allowing detection of an inadvertent loop of
the USB timer. At this time, the USB clock is forcibly stopped.
Figure 8-20 shows the operation flowchart of the USB timer.