Interrupt Service Routine (ISR) Flowcharts
13-99
USB Function Module
13.6.7 Device States Attached/Unattached Handler
The device attached/unattached interrupt (Figure 13–23) occurs either when
the device etects it is connected to the USB host or Hub (VBUS is on) or when
it becomes disconnected (VBUS is off). The local host can use this interrupt
to put the evice into deep sleep or to initialize any application-specific informa-
tion relating to the USB device.
Figure 13–23. Attached/Unattached Handler
Yes
End of attached/
unattached handler
Attached/unattached
handler
DEVSTAT.ATT
No
The device can now be put in
deep sleep (LH clock can be
shutoff).
Inform application
that the device has
been connected to
a USB host or hub.
Inform application
that the device has
been disconnected
from a USB host
or hub.
Set IRQ_SRC.DS_Chg
to clear the IT.
Must be done prior to remove the
LH clock
=1
Set IRQ_SRC.DS_Chg
to clear the IT.
=1
= 0?