MCBSTM32EXL Keil, MCBSTM32EXL Datasheet - Page 823

no-image

MCBSTM32EXL

Manufacturer Part Number
MCBSTM32EXL
Description
BOARD EVALUATION FOR STM32F103ZE
Manufacturer
Keil
Datasheets

Specifications of MCBSTM32EXL

Lead Free Status / RoHS Status
Lead free / RoHS Compliant
RM0008
1.
2.
3.
4.
5.
6.
Use the following sequence to disable a specific IN endpoint that has been previously
enabled.
Application programming sequence:
1.
2.
3.
4.
5.
6.
7.
The application must poll the OTG_FS_GRSTCTL register, until the TXFFLSH bit is cleared
by the core, which indicates the end of flush operation. To transmit new data on this
endpoint, the application can re-enable the endpoint at a later point.
To stop transmitting any data on a particular IN endpoint, the application must set the
IN NAK bit. To set this bit, the following field must be programmed.
Wait for assertion of the INEPNE interrupt in OTG_FS_DIEPINTx. This interrupt
indicates that the core has stopped transmitting data on the endpoint.
The core can transmit valid IN data on the endpoint after the application has set the
NAK bit, but before the assertion of the NAK Effective interrupt.
The application can mask this interrupt temporarily by writing to the INEPNEM bit in
DIEPMSK.
To exit Endpoint NAK mode, the application must clear the NAK status bit (NAKSTS) in
OTG_FS_DIEPCTLx. This also clears the INEPNE interrupt (in OTG_FS_DIEPINTx).
If the application masked this interrupt earlier, it must be unmasked as follows:
IN endpoint disable
The application must stop writing data on the AHB for the IN endpoint to be disabled.
The application must set the endpoint in NAK mode.
Wait for the INEPNE interrupt in OTG_FS_DIEPINTx.
Set the following bits in the OTG_FS_DIEPCTLx register for the endpoint that must be
disabled.
Assertion of the EPDISD interrupt in OTG_FS_DIEPINTx indicates that the core has
completely disabled the specified endpoint. Along with the assertion of the interrupt,
the core also clears the following bits:
The application must read the OTG_FS_DIEPTSIZx register for the periodic IN EP, to
calculate how much data on the endpoint were transmitted on the USB.
The application must flush the data in the Endpoint transmit FIFO, by setting the
following fields in the OTG_FS_GRSTCTL register:
SNAK = 1 in OTG_FS_DIEPCTLx
INEPNEM = 0 in DIEPMSK
CNAK = 1 in OTG_FS_DIEPCTLx
INEPNEM = 1 in DIEPMSK
SNAK = 1 in OTG_FS_DIEPCTLx
EPDIS = 1 in OTG_FS_DIEPCTLx
SNAK = 1 in OTG_FS_DIEPCTLx
EPENA = 0 in OTG_FS_DIEPCTLx
EPDIS = 0 in OTG_FS_DIEPCTLx
TXFNUM (in OTG_FS_GRSTCTL) = Endpoint transmit FIFO number
TXFFLSH in (OTG_FS_GRSTCTL) = 1
Doc ID 13902 Rev 9
USB on-the-go full-speed (OTG_FS)
823/995

Related parts for MCBSTM32EXL