RM0090
f)
g)
h)
Figure 398. Normal bulk/control OUT/SETUP and bulk/control IN transactions
init _reg(ch_2)
set _ch_en
set _ch_en
set _ch_en
read_rx_sts
read_rx_fifo
set _ch_en
read_rx_stsre
read_rx_sts
read_rx_sts
De-allocate
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)
Unmask (NAK/TXERR/STALL/XFRC)
The core generates the XFRC interrupt as soon as the last transaction is
completed successfully
In response to the XFRC interrupt, de-allocate the channel for other transfers
Handling non-ACK responses
Application
1
init_reg(ch _1)
1
write_tx_fifo
(ch_1)
2
(ch _2)
2
write_tx_fifo
(ch_1)
5
(ch _2)
(ch _2)
5
(ch _2)
7
De-allocate
(ch_1)
ad_rx_fifo
7
Disable
9
(ch _2)
11
(ch _2)
13
Bulk/Control OUT/SETUP
DocID018909 Rev 11
USB on-the-go full-speed (OTG_FS)
AHB
Host
4
1
3
MPS
ch_1
1
ch_2
MPS
ch_1
ch_2
3
4
RXFLVL interrupt
1
ch_1
MPS
ch_2
ch_2
ch_2
6
RXFLVL interrupt
6
1
MPS
ch_2
8
RXFLVL interrupt
RXFLVL interrupt
10
CHH interrupt r
12
USB
Device
Non-Periodic Request
Queue
Assume that this queue
can hold 4 entries.
ai15675
1329/1731
1368
Need help?
Do you have a question about the STM32F405 and is the answer not in the manual?