Figure 413. Processing A Setup Packet - ST STM32F423 Reference Manual

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32F423:
Table of Contents

Advertisement

USB on-the-go full-speed (OTG_FS)
1.
Program the OTG_DOEPTSIZx register.
2.
Wait for the RXFLVL interrupt (OTG_GINTSTS) and empty the data packets from the
receive FIFO.
3.
Assertion of the STUP interrupt (OTG_DOEPINTx) marks a successful completion of
the SETUP data transfer.
Handling more than three back-to-back SETUP packets
Per the USB 2.0 specification, normally, during a SETUP packet error, a host does not send
more than three back-to-back SETUP packets to the same endpoint. However, the USB 2.0
specification does not limit the number of back-to-back SETUP packets a host can send to
the same endpoint. When this condition occurs, the OTG_FS controller generates an
interrupt (B2BSTUP in OTG_DOEPINTx).
Setting the global OUT NAK
Internal data flow:
1.
When the application sets the Global OUT NAK (SGONAK bit in OTG_DCTL), the core
stops writing data, except SETUP packets, to the receive FIFO. Irrespective of the
1262/1324
STUPCNT = 3
On this interrupt, the application must read the OTG_DOEPTSIZx register to
determine the number of SETUP packets received and process the last received
SETUP packet.

Figure 413. Processing a SETUP packet

RM0430 Rev 8
RM0430

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F423 and is the answer not in the manual?

Questions and answers

Table of Contents