ST STM32F207 Series Reference Manual page 1239

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

Advertisement

RM0033
Application programming sequence:
1.
To stop receiving any kind of data in the receive FIFO, the application must set the
Global OUT NAK bit by programming the following field:
2.
Wait for the assertion of the GONAKEFF interrupt in OTG_HS_GINTSTS. When
asserted, this interrupt indicates that the core has stopped receiving any type of data
except SETUP packets.
3.
The application can receive valid OUT packets after it has set SGONAK in
OTG_HS_DCTL and before the core asserts the GONAKEFF interrupt
(OTG_HS_GINTSTS).
4.
The application can temporarily mask this interrupt by writing to the GINAKEFFM bit in
GINTMSK.
5.
Whenever the application is ready to exit the Global OUT NAK mode, it must clear the
SGONAK bit in OTG_HS_DCTL. This also clears the GONAKEFF interrupt
(OTG_HS_GINTSTS).
6.
If the application has masked this interrupt earlier, it must be unmasked as follows:
Disabling an OUT endpoint
The application must use this sequence to disable an OUT endpoint that it has enabled.
Application programming sequence:
1.
Before disabling any OUT endpoint, the application must enable Global OUT NAK
mode in the core.
2.
Wait for the GONAKEFF interrupt (OTG_HS_GINTSTS)
3.
Disable the required OUT endpoint by programming the following fields:
4.
Wait for the EPDISD interrupt (OTG_HS_DOEPINTx), which indicates that the OUT
endpoint is completely disabled. When the EPDISD interrupt is asserted, the core also
clears the following bits:
5.
The application must clear the Global OUT NAK bit to start receiving data from other
nondisabled OUT endpoints.
Transfer Stop Programming for OUT endpoints
The application must use the following programing sequence to stop any transfers (because
of an interrupt from the host, typically a reset).
Sequence of operations:
SGONAK = 1 in OTG_HS_DCTL
GINAKEFFM = 0 in GINTMSK
OTG_HS_DCTL = 1 in CGONAK
GINAKEFFM = 1 in GINTMSK
SGONAK = 1 in OTG_HS_DCTL
EPDIS = 1 in OTG_HS_DOEPCTLx
SNAK = 1 in OTG_HS_DOEPCTLx
EPDIS = 0 in OTG_HS_DOEPCTLx
EPENA = 0 in OTG_HS_DOEPCTLx
SGONAK = 0 in OTG_HS_DCTL
USB on-the-go high-speed (OTG_HS)
RM0033 Rev 9
1239/1381
1260

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Table of Contents