Interrupt Service Routine (ISR) Flowcharts
13-105
USB Function Module
13.6.11
Non-Isochronous, Non-Control OUT Endpoint Receive Interrupt Handler
Figure 13–28 shows the operations necessary to handle non-isochronous,
non-control OUT endpoint-specific receive interrupts. This flowchart shows
two different RX transaction handshaking interrupts. There is a third interrupt
handshaking possibility when NAK interrupts are enabled, which is not
depicted here. Depending on the application-specific actions needed for
various endpoints in the real system, it is possible to use one routine that is
common to all of the non-isochronous, non-control receive endpoints, where
the only differences are in EP_NUM register value set for the selection of the
proper application RX data buffer in the read non-isochronous RX FIFO data
routine (see Figure 13–29).
This flowchart does not attempt to document control endpoint 0 receive inter-
rupts, which are discussed separately due to the more complex three-stage
transfer mechanism used for control writes.
13.6.12
Non-Isochronous, Non-Control IN Endpoint Transmit Interrupt Handler
Figure 13–30 shows the operations necessary to handle non-isochronous,
non-control IN endpoint-specific transmit interrupts. This flowchart shows two
TX transaction handshaking interrupts. There is a third interrupt handshaking
possibility when NAK interrupts are enabled, which is not depicted here.
Depending on the application-specific actions needed for various endpoints
in the real system, it is possible to use one routine that is common to all of the
non-isochronous, non-control transmit endpoints, where the only differences
are in EP_NUM register value set for the routine selection of the application
TX buffer (see Figure 13–31).
This flowchart does not attempt to document control endpoint 0 transmit inter-
rupts, which are discussed separately due to the more complex three-stage
transfer mechanism used for control reads.
13.6.13
SOF Interrupt Handler
SOF interrupts to the local host occur once per USB frame. The local host must
handle data traffic for the isochronous endpoints at each SOF interrupt. In
addition, the SOF ISR can handle any application-specific activity related to
the implicit timing of the SOF interrupt. Figure 13–32 shows the SOF ISR flow-
chart. The read isochronous RX FIFO data and write isochronous TX FIFO
data procedures are shown in Figure 13–33 and Figure 13–34, respectively.