Interrupt Service Routine (ISR) Flowcharts
13-95
USB Function Module
Figure 13–20. Prepare for Control Read Status Stage Routine
Prepare for control
read status stage
routine
End of prepare for
control read status
stage routine
Application-
specific actions
to determine
control read
action and
status result
Set CTRL.Clr_EP to
1, then set
CTRL.Set_FIFO_En
to 1.
Want to respond
with ACK?
No
Want to respond
with stall?
Set SYSCON2.
Stall_Cmd to 1.
Yes
Enable NAK interrupt by
setting SYSCON1.Nak_En
to 1 if not already enabled.
No
Write EP_NUM register:
– EP_NUM.EP_Num = 0
– EP_NUM.EP_Dir = 0
– EP_NUM.EP_Sel = 1
– EP_NUM.Setup_Sel = 0
Write EP_NUM register:
– EP_NUM.EP_Num = 0
– EP_NUM.EP_Dir = 0
– EP_NUM.EP_Sel = 0
– EP_NUM.Setup_Sel = 0
Yes