RM0351
isochronous data packets are ignored and not written to the receive FIFO, and non-
isochronous OUT tokens receive a NAK handshake reply.
4.
After the data are written to the receive FIFO, the application reads the data from the
receive FIFO and writes it to external memory, one packet at a time per endpoint.
5.
At the end of every packet write on the AHB to external memory, the transfer size for
the endpoint is decremented by the size of the written packet.
6.
The OUT data transfer completed pattern for an OUT endpoint is written to the receive
FIFO on one of the following conditions:
–
–
7.
When either the application pops this entry (OUT data transfer completed), a transfer
completed interrupt is generated for the endpoint and the endpoint enable is cleared.
Application programming sequence:
1.
Program the OTG_DOEPTSIZx register for the transfer size and the corresponding
packet count.
2.
Program the OTG_DOEPCTLx register with the endpoint characteristics, and set the
EPENA and CNAK bits.
–
–
3.
Wait for the RXFLVL interrupt (in OTG_GINTSTS) and empty the data packets from the
receive FIFO.
–
4.
Asserting the XFRC interrupt (OTG_DOEPINTx) marks a successful completion of the
non-isochronous OUT data transfer.
5.
Read the OTG_DOEPTSIZx register to determine the size of the received data
payload.
•
Generic isochronous OUT data transfer
This section describes a regular isochronous OUT data transfer.
Application requirements:
1.
All the application requirements for non-isochronous OUT data transfers also apply to
isochronous OUT data transfers.
2.
For isochronous OUT data transfers, the transfer size and packet count fields must
always be set to the number of maximum-packet-size packets that can be received in a
single frame and no more. Isochronous OUT data transfers cannot span more than 1
frame.
3.
The application must read all isochronous OUT data packets from the receive FIFO
(data and status) before the end of the periodic frame (EOPF interrupt in
OTG_GINTSTS).
4.
To receive data in the following frame, an isochronous OUT endpoint must be enabled
after the EOPF (OTG_GINTSTS) and before the SOF (OTG_GINTSTS).
Internal data flow:
The transfer size is 0 and the packet count is 0
The last OUT data packet written to the receive FIFO is a short packet
(0 ≤ packet size < maximum packet size)
EPENA = 1 in OTG_DOEPCTLx
CNAK = 1 in OTG_DOEPCTLx
This step can be repeated many times, depending on the transfer size.
DocID024597 Rev 3
USB on-the-go full-speed (OTG_FS)
1625/1693
1644
Need help?
Do you have a question about the STM32L4x6 and is the answer not in the manual?
Questions and answers