
USB on-the-go full-speed (OTG_FS)
RM0008
896/1096
Doc ID 13902 Rev 12
1.
When an STALL, TXERR, BBERR or DTERR interrupt in OTG_FS_HCINTx is received
for an IN or OUT channel. The application must be able to receive other interrupts
(DTERR, Nak, Data, TXERR) for the same channel before receiving the halt.
2.
When a DISCINT (Disconnect Device) interrupt in OTG_FS_GINTSTS is received.
(The application is expected to disable all enabled channels).
3.
When the application aborts a transfer before normal completion.
Operational model
The application must initialize a channel before communicating to the connected device.
This section explains the sequence of operation to be performed for different types of USB
transactions.
●
Writing the transmit FIFO
The OTG_FS host automatically writes an entry (OUT request) to the periodic/non-
periodic request queue, along with the last Word write of a packet. The application must
ensure that at least one free space is available in the periodic/non-periodic request
queue before starting to write to the transmit FIFO. The application must always write to
the transmit FIFO in Words. If the packet size is non-Word aligned, the application must
use padding. The OTG_FS host determines the actual packet size based on the
programmed maximum packet size and transfer size.
Figure 311. Transmit FIFO write task
MP
S
: M
a
xim
u
m p
a
cket
s
ize
S
t
a
rt
a
i1567
3b
W
a
it for NPTXFE/PTXFE
interr
u
pt in
OTG_F
S
_GINT
S
T
S
Re
a
d GNPTX
S
T
S
/HPTXF
S
IZ
regi
s
ter
s
for
a
v
a
il
ab
le FIFO
a
nd
qu
e
u
e
s
p
a
ce
s
1 MP
S
or
LP
S
FIFO
s
p
a
ce
a
v
a
il
ab
le?
Write 1 p
a
cket
d
a
t
a
to
tr
a
n
s
mit FIFO
More p
a
cket
s
to
s
end?
Done
No
No
Ye
s
Ye
s
LP
S
: L
as
t p
a
cket
s
ize