DocID018909 Rev 11
RM0090
USB on-the-go full-speed (OTG_FS)
1368
f)
The core generates the XFRC interrupt as soon as the last transaction is
completed successfully
g) In response to the XFRC interrupt, de-allocate the channel for other transfers
h) Handling non-ACK responses
Figure 398. Normal bulk/control OUT/SETUP and bulk/control IN transactions
The channel-specific interrupt service routine for bulk and control OUT/SETUP
transactions is shown in the following code samples.
•
Interrupt service routine for bulk/control OUT/SETUP and bulk/control IN
transactions
a) Bulk/Control
OUT/SETUP
Unmask (NAK/TXERR/STALL/XFRC)
ACK
Host
Application
Device
AHB
USB
OUT
DAT A0
MPS
1
MPS
1
MPS
write_tx_fifo
(ch_1)
init_reg(ch _1)
set_ch_en
(ch _2)
init_reg(ch_2)
write_tx_fifo
(ch_1)
set_ch_en
(ch _2)
ch_2
ch_2
ch_1
ch_1
De-allocate
(ch_1)
IN
ch_2
ch_2
ch_2
ch_1
ACK
O UT
set_ch_en
(ch _2)
Non-Periodic Request
Queue
Assume that this queue
can hold 4 entries.
4
1
6
ACK
DAT A0
IN
ACK
read_rx_sts
read_rx_fifo
1
MPS
set_ch_en
(ch _2)
1
MPS
read_rx_stsre
ad_rx_fifo
read_rx_sts
Disable
(ch _2)
1
2
3
4
5
6
7
De-allocate
(ch _2)
CHH interrupt
r
ch_2
2
3
5
7
8
9
12
13
read_rx_sts
10
11
DAT A1
MPS
DAT A1
ai15675
RXFLVL interrupt
XFRC interrupt
RXFLVL interrupt
RXFLVL interrupt
RXFLVL interrupt
XFRC interrupt