Interrupt Service Routine (ISR) Flowcharts
13-104
Figure 13–27. Non-Isochronous Endpoint-Specific (Except ER 0) ISR Flowchart
Enter non_ISO
endpoint-specific ISR
Return from non_ISO
endpoint-specifc ISR
No
IRQ_SRC.
EPn_RX = 1?
TX handler
Read endp_nb value
from EPN_STAT.
EPn_RX_IT_src.
Write 1 to
IRQ_SRC.EPn_RX to
clear the IT.
Write EP_NUM register:
– EP_NUM.EP_Num = endp_nb
– EP_NUM.EP_Dir = 0
– EP_NUM.EP_Sel = 1
– EP_NUM.Setup_Sel = 0
Yes
Write EP_NUM register:
– EP_NUM.EP_Num = endp_nb
– EP_NUM.EP_Dir = 0
– EP_NUM.EP_Sel = 0
– EP_NUM.Setup_Sel = 0
Read endp_nb value
from EPN_STAT.
EPn_TX_IT_src
Write EP_NUM register:
– EP_NUM.EP_Num = endp_nb
– EP_NUM.EP_Dir = 1
– EP_NUM.EP_Sel = 1
– EP_NUM.Setup_Sel = 0
RX handler
Write EP_NUM register:
– EP_NUM.EP_Num = endp_nb
– EP_NUM.EP_Dir = 1
– EP_NUM.EP_Sel = 0
– EP_NUM.Setup_Sel = 0
Write 1 to
IRQ_SRC.EPn_TX to
clear the IT.
Must be
IRQ_SRC.EPn_TX
Flag Fifo not full
and DB
= 1?
Write CTRL register:
– CTRL.Set_FIFO_En = 1.
Yes
No