EasyManuals Logo

ST STM32F207 series User Manual

ST STM32F207 series
1381 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1236 background imageLoading...
Page #1236 background image
USB on-the-go high-speed (OTG_HS) RM0033
1236/1381 RM0033 Rev 9
Figure 389. Receive FIFO packet read in slave mode
SETUP transactions
This section describes how the core handles SETUP packets and the application’s
sequence for handling SETUP transactions.
Application requirements
1. To receive a SETUP packet, the STUPCNT field (OTG_HS_DOEPTSIZx) in a control
OUT endpoint must be programmed to a nonzero value. When the application
programs the STUPCNT field to a nonzero value, the core receives SETUP packets
and writes them to the receive FIFO, irrespective of the NAK status and EPENA bit
setting in OTG_HS_DOEPCTLx. The STUPCNT field is decremented every time the
control endpoint receives a SETUP packet. If the STUPCNT field is not programmed to
a proper value before receiving a SETUP packet, the core still receives the SETUP
packet and decrements the STUPCNT field, but the application may not be able to
determine the correct number of SETUP packets received in the Setup stage of a
control transfer.
STUPCNT = 3 in OTG_HS_DOEPTSIZx
2. The application must always allocate some extra space in the Receive data FIFO, to be
able to receive up to three SETUP packets on a control endpoint.
The space to be reserved is 10 words. Three words are required for the first
SETUP packet, 1 word is required for the Setup stage done word and 6 words are
required to store two extra SETUP packets among all control endpoints.
3 words per SETUP packet are required to store 8 bytes of SETUP data and 4
bytes of SETUP status (Setup packet pattern). The core reserves this space in the
receive data.
FIFO to write SETUP data only, and never uses this space for data packets.
MSv65221V1
rd_data = rd_reg(OTG_HS_GRXSTSP);
mem[0:dword_cnt-1] =
rd_rxfifo(rd_data.EPNUM,
dword_cnt)
rd_data.BCNT = 0
Wait until RXFLVL in OTG_HS_GINTSTSG
dword_cnt =
BCNT[11:2] +
(BCNT[1]| BCNT[1])
rcv_out_pkt()
Packet
store in
memory
N
Y

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32F207 series and is the answer not in the manual?

ST STM32F207 series Specifications

General IconGeneral
BrandST
ModelSTM32F207 series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals