29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

RM0008<br />

Host mode:<br />

OTG_FS Receive status debug read/OTG status read <strong>and</strong> pop registers<br />

(OTG_FS_GRXSTSR/OTG_FS_GRXSTSP)<br />

Address offset for Read: 0x01C<br />

Address offset for Pop: 0x020<br />

Reset value: 0x0000 0000<br />

A read to the Receive status debug read register returns the contents of the top of the<br />

Receive FIFO. A read to the Receive status read <strong>and</strong> pop register additionally pops the top<br />

data entry out of the RxFIFO.<br />

The receive status contents must be interpreted differently in Host <strong>and</strong> Device modes. The<br />

core ignores the receive status pop/read when the receive FIFO is empty <strong>and</strong> returns a<br />

value of 0x0000 0000. The application must only pop the Receive Status FIFO when the<br />

Receive FIFO non-empty bit of the Core interrupt register (RXFLVL bit in<br />

OTG_FS_GINTSTS) is asserted.<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

Reserved<br />

PKTSTS DPID BCNT CHNUM<br />

r r r r<br />

Bits 31:21 Reserved<br />

Bits 20:17 PKTSTS: Packet status<br />

Indicates the status of the received packet<br />

0010: IN data packet received<br />

0011: IN transfer completed (triggers an interrupt)<br />

0101: Data toggle error (triggers an interrupt)<br />

0111: Channel halted (triggers an interrupt)<br />

Others: Reserved<br />

Bits 16:15 DPID: Data PID<br />

Indicates the Data PID of the received packet<br />

00: DATA0<br />

10: DATA1<br />

01: DATA2<br />

11: MDATA<br />

Bits 14:4 BCNT: Byte count<br />

Indicates the byte count of the received IN data packet.<br />

Bits 3:0 CHNUM: Channel number<br />

Indicates the channel number to which the current received packet belongs.<br />

738/995 Doc ID 13902 Rev 9

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

Saved successfully!

Ooh no, something went wrong!