Interrupt Service Routine (ISR) Flowcharts
13-109
USB Function Module
Figure 13–31. Write Non-Isochronous TX FIFO Data Flowchart
Write non-ISO TX
FIFO data
Read byte from
application’s TX buffer
Loop count = 0?
No
Write byte to DATA
Decrement loop count
Save endpoint-specific
copy of amount of data
placed into TX FIFO
(loop count).
Yes
End of write non-ISO
TX FIFO data
Set loop count to #
bytes in application’s
TX buffer.
Loop count <=
endpoint’s current
configured length?
Yes
No
Set loop count to
endpoint’s current
configured length.
The TX data copied from the application’s TX buffer is
not retired from the buffer until it is correctly received by the USB host
The loop count must be set to 0 for sending an empty
data packet.
(In transaction with ACK). The count saved here is used at that time to
retire the correct amount of TX buffer data. If double buffer is used,
two packets are saved into TX buffer.
In case of 16-bit access mode,
the local host writes 2 bytes
at each access. If the number of
bytes in application’s buffer is odd,
the LH must change the access
mode to 8 bit access for the last
byte write.
(2 bytes read in case of
16-bit access)