28 USB FUNCTION CONTROLLER (USB)
28-12
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
(1) DISABLE
The macro enters this state when the USB_Control.EnAutoNego bit is cleared.
To enable the auto-negotiation function, set interruptions for Reset detection (SIE_IntEnb.EnDetectReset)
and Suspend detection (SIE_IntEnb.EnDetectSuspend) before setting the USB_Control.EnAutoNego bit
and give permission to event detection interruption.
Enabling the auto-negotiation function automatically clears the USB_Control.DisBusDetect bit and enables
the event detection function. While the auto-negotiation function is enabled, never set the USB_Control.
DisBusDetect bit.
(2) NORMAL
This is a state of waiting for Reset or Suspend detection.
The state is determined to be Reset if SE0 of 2.5 µs or greater, and it is determined to be Suspend if no ac-
tivities are detected beyond 3 ms. Concurrently with judgment as described above, an interruption for Reset
detection or Suspend detection is generated, and the SIE_IntStat.DetectReset bit and the SIE_IntStat.De-
tectSuspend bit are set.
If the state is determined to be Suspend, suspend the event detection function once and enter the IN_SUS-
PEND state.
(3) IN_SUSPEND
When the state is determined to be suspended, H/W automatically sets the USB_Control.InSUSPEND bit
and the macro enters the IN_SUSPEND state. This USB_Control.InSUSPEND bit enables the function of
detecting changes of buses from FS-J, only enabling detection of Resume or Reset from the host.
The ability to reduce current consumption during Suspend depends on the application. This macro provides
SNOOZE function for reducing current consumption. To use the function of reducing current consumption
when the auto-negotiation function is enabled, be sure to check that the USB_Control.InSUSPEND bit is
set before staring the current consumption reducing function.
At this time, in order to detect Resume (FS-K) that indicates the end of Suspend, set the SIE_IntEnb.En-
NonJ bit in the firmware when the macro enters this state to give permission to NonJ interruption.
When NonJ interruption status (SIE_IntStat.NonJ) is set, it is interpreted as an indication of return from
Suspend, and the macro enters the CHK_EVENT state after the USB_Control.InSUSPEND bit is cleared in
the firmware.
In an application with a remote wake-up function enabled, if it is determined that the macro must return
from Suspend, set the USB_Control.SendWakeup bit in this state and output FS-K at least for 1 ms but do
not exceed 15 ms.
(4) CHK_EVENT
In this state, the macro checks the USB cable and determines that the state is Resume if FS-K is detected,
and that it is Reset if SE0 is detected. When determined to be Reset, set the SIE_IntStat.DetectReset bit.
Note that you should terminate this auto-negotiation function as soon as the USB cable is unplugged; in none of
the above states, the macro does not consider the implication of USB cable disconnection.
Description by negotiation function
Suspend detection
When the USB_Control.DisBusDetect bit is set to 0, the macro hardware automatically performs the fol-
lowing Suspend detection sequence.
(1) The internal timer checks that there is no data transmission/reception (continues to detect “J” in USB_
Status.LineState[1:0]) for 3 ms or longer (T
1
).
(2) At T
2
, if “J” is detected in USB_Status.LineState[1:0], set the SIE_IntStat.DetectSuspend bit.
(3) If the SIE_IntEnb.EnDetectSuspend and MainIntEnb.EnSIE_IntStat bits are set, the macro asserts the
#INT signal.
If the SIE_IntStat.DetectSuspend bit is set, on the firmware that controls this macro, set the USB_Control.
DisBusDetect bit to 1 and USBSNZ/MISC_USB register to 1 to start processing Snooze before reaching
T
4
. As for self-powered products, however, the firmware does not have to perform Snooze. (Figure 28.5.1.9
shows the operation when Snooze is performed.)