MCBSTM32EXL Keil, MCBSTM32EXL Datasheet - Page 828

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
USB on-the-go full-speed (OTG_FS)
828/995
Application programming sequence:
1.
2.
3.
4.
5.
6.
This section describes how the application can stall a non-isochronous endpoint.
Application programming sequence:
1.
2.
3.
4.
5.
6.
Special case: stalling the control OUT endpoint
The core must stall IN/OUT tokens if, during the data stage of a control transfer, the host
sends more IN/OUT tokens than are specified in the SETUP packet. In this case, the
application must enable the ITTXFE interrupt in OTG_FS_DIEPINTx and the OTEPDIS
interrupt in OTG_FS_DOEPINTx during the data stage of the control transfer, after the core
has transferred the amount of data specified in the SETUP packet. Then, when the
The application can ignore the IN token received when TxFIFO empty interrupt in
OTG_FS_DIEPINTx on any isochronous IN endpoint, as it eventually results in an
incomplete isochronous IN transfer interrupt (in OTG_FS_GINTSTS).
Assertion of the incomplete isochronous IN transfer interrupt (in OTG_FS_GINTSTS)
indicates an incomplete isochronous IN transfer on at least one of the isochronous IN
endpoints.
The application must read the Endpoint Control register for all isochronous IN
endpoints to detect endpoints with incomplete IN data transfers.
The application must stop writing data to the Periodic Transmit FIFOs associated with
these endpoints on the AHB.
Program the following fields in the OTG_FS_DIEPCTLx register to disable the
endpoint:
The assertion of the Endpoint Disabled interrupt in OTG_FS_DIEPINTx indicates that
the core has disabled the endpoint.
Stalling non-isochronous IN endpoints
Disable the IN endpoint to be stalled. Set the STALL bit as well.
EPDIS = 1 in OTG_FS_DIEPCTLx, when the endpoint is already enabled
Assertion of the Endpoint Disabled interrupt (in OTG_FS_DIEPINTx) indicates to the
application that the core has disabled the specified endpoint.
The application must flush the non-periodic or periodic transmit FIFO, depending on
the endpoint type. In case of a non-periodic endpoint, the application must re-enable
the other non-periodic endpoints that do not need to be stalled, to transmit data.
Whenever the application is ready to end the STALL handshake for the endpoint, the
STALL bit must be cleared in OTG_FS_DIEPCTLx.
If the application sets or clears a STALL bit for an endpoint due to a
SetFeature.Endpoint Halt command or ClearFeature.Endpoint Halt command, the
STALL bit must be set or cleared before the application sets up the Status stage
transfer on the control endpoint.
SNAK = 1 in OTG_FS_DIEPCTLx
EPDIS = 1 in OTG_FS_DIEPCTLx
At this point, the application must flush the data in the associated transmit FIFO or
overwrite the existing data in the FIFO by enabling the endpoint for a new transfer
in the next microframe. To flush the data, the application must use the
OTG_FS_GRSTCTL register.
STALL = 1 in OTG_FS_DIEPCTLx
The STALL bit always takes precedence over the NAK bit
Doc ID 13902 Rev 9
RM0008

Related parts for MCBSTM32EXL