End of device state
changed handler
Device state changed
handler
Read DEVSTAT
register (new value),
read DS_MEM
(previous value).
DEVSTAT.
ATT changed?
Attached/
unattached
handler
DEVSTAT.
USB_Reset or
DEF changed?
USB reset
handler
Device state must be
at least attached at
this point.
DEVSTAT.
SUS changed?
Suspend/
resume
handler
DEVSTAT.
R_Wk_Ok
changed?
Inform application that
a set/clear device
feature has modified
the remote wake-up
enable function.
DEVSTAT.
CFG changed
?
DEVSTAT.
CFG = 1?
DEVSTAT.
ADD = 1?
Application-specific
Application-specific
default state transition
DEVSTAT.
ADD changed?
Action-specific
Application-specific
Set IRQ_SRC.
DS_CHG = 1 to
clear the interrupt.
Save DEVSTAT
in DS_MEM for
next DS_CHG interrupt.
No
Yes
Yes
No
Device state must be
at least default at this
point.
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Must be
not
configured
yet
Yes
No
IRQ_SRC.DS_CHG interrupt
flag is cleared inside the
attached/unattached, USB
reset and suspend/resume
handlers.
DEVSTAT.
ADD = 1?
Yes
No
action to handle
addressed state to
configured state to
transition
action to handle
configured state to
addressed state
transition
Application-specific
action to handle
configured state to
action to handle default
state addressed
state transsition
action to handle
addressed state to
default state transition
Set IRQ_SRC.
DS_CHG = 1 to
clear the interrupt.
Set IRQ_SRC.
DS_CHG = 1 to
clear the interrupt.
USB Device Controller
1627
SPNU503C – March 2018
Copyright © 2018, Texas Instruments Incorporated
Universal Serial Bus (USB)
Figure 29-70. Typical Operation for USB Device State Changed Interrupt Handler