Interrupt Service Routine (ISR) Flowcharts
13-94
Figure 13–19. Endpoint 0 TX Interrupt Handler
Endpoint 0 TX fandler
End of endpoint 0 RX
handler
Decrement
wlength_count value by
nb of received bytes.
STAT_FLG.
ACK bit set?
Control
write flag set
?
Application-
specific actions
to complete
control write
wlength_count
> 0 or other
data to send
?
Set
CTRL.Set_FIFO_En bit
to 1.
Prepare for
control read
status stage.
Is LH-initiated stall
and can remove halt
condition ?
Set CTRL.Clr_Halt
bit to 1.
Application-
specific action
to resolve stall
No
Yes
Yes
Yes
No
If control read data stage (IN
transactions on EP0) is out of control,
read data stage or control write
status stage are automatically
stalled by the core.
Yes
No. Must be STAT_FLG.STALL.
Flush data from EPO
application’s TX buffer
(based on amount
previously put into TX FIFO).
Write non-ISO
TX data.
Write EP_NUM register:
– EP_NUM.EP_Num = 0
– EP_NUM.EP_Dir = 1
– EP_NUM.EP_Sel = 1
– EP_NUM.Setup_Sel = 0
Write EP_NUM register:
– EP_NUM.EP_Num = 0
– EP_NUM.EP_Dir = 1
– EP_NUM.EP_Sel = 0
– EP_NUM.Setup_Sel = 0
No
Write EP_NUM register:
– EP_NUM.EP_Num = 0
– EP_NUM.EP_Dir = 1
– EP_NUM.EP_Sel = 0
– EP_NUM.Setup_Sel = 0
Write EP_NUM register:
– EP_NUM.EP_Num = 0
– EP_NUM.EP_Dir = 1
– EP_NUM.EP_Sel = 0
– EP_NUM.Setup_Sel = 0
Write EP_NUM register:
– EP_NUM.EP_Num = 0
– EP_NUM.EP_Dir = 1
– EP_NUM.EP_Sel = 0
– EP_NUM.Setup_Sel = 0
Write EP_NUM register:
– EP_NUM.EP_Num = 0
– EP_NUM.EP_Dir = 1
– EP_NUM.EP_Sel = 0
– EP_NUM.Setup_Sel = 0