ST STM32F412 Reference Manual page 1113

Advanced arm-based 32-bit mcus
Table of Contents

Advertisement

RM0402
mode) for the frame is not present in the FIFO, then the core generates an IN token
received when Tx FIFO empty interrupt for the endpoint.
5.
The packet count for the endpoint is decremented by 1 under the following conditions:
6.
At the "Periodic frame Interval" (controlled by PFIVL in OTG_DCFG), when the core
finds non-empty any of the isochronous IN endpoint FIFOs scheduled for the current
frame non-empty, the core generates an IISOIXFR interrupt in OTG_GINTSTS.
Application programming sequence:
1.
Program the OTG_DIEPCTLx register with the endpoint characteristics and set the
CNAK and EPENA bits.
2.
Write the data to be transmitted in the next frame to the transmit FIFO.
3.
Asserting the ITTXFE interrupt (in OTG_DIEPINTx) indicates that the application has
not yet written all data to be transmitted to the transmit FIFO.
4.
If the interrupt endpoint is already enabled when this interrupt is detected, ignore the
interrupt. If it is not enabled, enable the endpoint so that the data can be transmitted on
the next IN token attempt.
5.
Asserting the XFRC interrupt (in OTG_DIEPINTx) with no ITTXFE interrupt in
OTG_DIEPINTx indicates the successful completion of an isochronous IN transfer. A
read to the OTG_DIEPTSIZx register must give transfer size = 0 and packet count = 0,
indicating all data were transmitted on the USB.
6.
Asserting the XFRC interrupt (in OTG_DIEPINTx), with or without the ITTXFE interrupt
(in OTG_DIEPINTx), indicates the successful completion of an interrupt IN transfer. A
read to the OTG_DIEPTSIZx register must give transfer size = 0 and packet count = 0,
indicating all data were transmitted on the USB.
7.
Asserting the incomplete isochronous IN transfer (IISOIXFR) interrupt in
OTG_GINTSTS with none of the aforementioned interrupts indicates the core did not
receive at least 1 periodic IN token in the current frame.
Incomplete isochronous IN data transfers
This section describes what the application must do on an incomplete isochronous IN data
transfer.
Internal data flow:
1.
An isochronous IN transfer is treated as incomplete in one of the following conditions:
a)
b)
A zero-length data packet is transmitted on the USB for isochronous IN endpoints
A NAK handshake is transmitted on the USB for interrupt IN endpoints
For isochronous endpoints, when a zero- or non-zero-length data packet is
transmitted
For interrupt endpoints, when an ACK handshake is transmitted
When the transfer size and packet count are both 0, the transfer completed
interrupt for the endpoint is generated and the endpoint enable is cleared.
The core receives a corrupted isochronous IN token on at least one isochronous
IN endpoint. In this case, the application detects an incomplete isochronous IN
transfer interrupt (IISOIXFR in OTG_GINTSTS).
The application is slow to write the complete data payload to the transmit FIFO
and an IN token is received before the complete data payload is written to the
FIFO. In this case, the application detects an IN token received when Tx FIFO
empty interrupt in OTG_DIEPINTx. The application can ignore this interrupt, as it
USB on-the-go full-speed (OTG_FS)
RM0402 Rev 6
1113/1163
1122

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Table of Contents

Save PDF