29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

USB on-the-go full-speed (OTG_FS)<br />

RM0008<br />

Figure 271. Receive FIFO read task<br />

Start<br />

No<br />

RXFLVL<br />

interrupt <br />

Yes<br />

Unmask RXFLVL<br />

interrupt<br />

Mask RXFLVL<br />

interrupt<br />

Unmask RXFLVL<br />

interrupt<br />

Read the received<br />

packet from the<br />

Receive FIFO<br />

Read<br />

OTG_FS_GRXSTSP<br />

PKTSTS<br />

0b0010<br />

No<br />

Yes<br />

Yes<br />

BCNT > 0<br />

No<br />

ai15674<br />

●<br />

●<br />

Bulk <strong>and</strong> control OUT/SETUP transactions<br />

A typical bulk or control OUT/SETUP pipelined transaction-level operation is shown in<br />

Figure 272. See channel 1 (ch_1). Two bulk OUT packets are transmitted. A control<br />

SETUP transaction operates in the same way but has only one packet. The<br />

assumptions are:<br />

– The application is attempting to send two maximum-packet-size packets (transfer<br />

size = 1, 024 bytes).<br />

– The non-periodic transmit FIFO can hold two packets (128 KB for FS).<br />

– The non-periodic request queue depth = 4.<br />

Normal bulk <strong>and</strong> control OUT/SETUP operations<br />

The sequence of operations in Figure 272 (channel 1) is as follows:<br />

a) Initialize channel 1<br />

b) Write the first packet for channel 1<br />

c) Along with the last DWORD write, the core writes an entry to the non-periodic<br />

request queue<br />

d) As soon as the non-periodic queue becomes non-empty, the core attempts to<br />

send an OUT token in the current frame<br />

e) Write the second (last) packet for channel 1<br />

f) The core generates the XFRC interrupt as soon as the last transaction is<br />

completed successfully<br />

g) In response to the XFRC interrupt, de-allocate the channel for other transfers<br />

h) H<strong>and</strong>ling non-ACK responses<br />

796/995 Doc ID 13902 Rev 9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!