USB on-the-go high-speed (OTG_HS)
RM0090
1376/1731
DocID018909 Rev 11
frame. This interrupt is asserted along with the end of periodic frame interrupt
(OTG_HS_GINTSTS/EOPF).
•
5 OUT endpoints
–
They can be configured to support the isochronous, bulk or interrupt transfer type.
–
They feature dedicated control (OTG_HS_DOEPCTLx), transfer configuration
(OTG_HS_DOEPTSIZx) and status-interrupt (OTG_HS_DOEPINTx) registers.
–
The Device Out endpoints common interrupt mask register
(OTG_HS_DOEPMSK) allows to enable/disable a single endpoint interrupt source
on all OUT endpoints (EP0 included).
–
They support incomplete isochronous OUT transfer interrupt (INCOMPISOOUT
bit in OTG_HS_GINTSTS). This interrupt is asserted when there is at least one
isochronous OUT endpoint on which the transfer is not completed in the current
frame. This interrupt is asserted along with the end of periodic frame interrupt
(OTG_HS_GINTSTS/EOPF).
Endpoint controls
The following endpoint controls are available through the device endpoint-x IN/OUT control
register (DIEPCTLx/DOEPCTLx):
•
Endpoint enable/disable
•
Endpoint activation in current configuration
•
Program the USB transfer type (isochronous, bulk, interrupt)
•
Program the supported packet size
•
Program the Tx-FIFO number associated with the IN endpoint
•
Program the expected or transmitted data0/data1 PID (bulk/interrupt only)
•
Program the even/odd frame during which the transaction is received or transmitted
(isochronous only)
•
Optionally program the NAK bit to always send a negative acknowledge to the host
regardless of the FIFO status
•
Optionally program the STALL bit to always stall host tokens to that endpoint
•
Optionally program the Snoop mode for OUT endpoint where the received data CRC is
not checked
Endpoint transfer
The device endpoint-x transfer size registers (DIEPTSIZx/DOEPTSIZx) allow the application
to program the transfer size parameters and read the transfer status.
The programming operation must be performed before setting the endpoint enable bit in the
endpoint control register.
Once the endpoint is enabled, these fields are read-only as the OTG FS core updates them
with the current transfer status.
The following transfer parameters can be programmed:
•
Transfer size in bytes
•
Number of packets constituting the overall transfer size.