09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

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.

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

Host mode:<br />

OTG_FS Receive status debug read/OTG status read and 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 and pop register additionally pops the top<br />

data entry out of the RxFIFO.<br />

The receive status contents must be interpreted differently in host and device modes. The<br />

core ignores the receive status pop/read when the receive FIFO is empty and 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 />

Bits 31:21 Reserved, must be kept at reset value.<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 />

PKTSTS DPID BCNT CHNUM<br />

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

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

r r r r<br />

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

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

Doc ID 018909 Rev 3 1062/1416

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

Saved successfully!

Ooh no, something went wrong!