09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

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) <strong>RM0090</strong><br />

OTG_FS device endpoint-x transfer size register (OTG_FS_DIEPTSIZx)<br />

(x = 1..3, where x = Endpoint_number)<br />

Address offset: 0x910 + (Endpoint_number × 0x20)<br />

Reset value: 0x0000 0000<br />

The application must modify this register before enabling the endpoint. Once the endpoint is<br />

enabled using the Endpoint enable bit in the OTG_FS_DIEPCTLx registers (EPENA bit in<br />

OTG_FS_DIEPCTLx), the core modifies this register. The application can only read this<br />

register once the core has cleared the Endpoint enable bit.<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 />

MCNT PKTCNT XFRSIZ<br />

rw/<br />

r/r<br />

w<br />

rw/<br />

r/r<br />

w<br />

rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw<br />

Bit 31 Reserved, must be kept at reset value.<br />

Bits 30:29 MCNT: Multi count<br />

For periodic IN endpoints, this field indicates the number of packets that must be transmitted<br />

per frame on the USB. The core uses this field to calculate the data PID for isochronous IN<br />

endpoints.<br />

01: 1 packet<br />

10: 2 packets<br />

11: 3 packets<br />

Bit 28:19 PKTCNT: Packet count<br />

Indicates the total number of USB packets that constitute the Transfer Size amount of data<br />

for this endpoint.<br />

This field is decremented every time a packet (maximum size or short packet) is read from<br />

the TxFIFO.<br />

Bits 18:0 XFRSIZ: Transfer size<br />

This field contains the transfer size in bytes for the current endpoint. The core only interrupts<br />

the application after it has exhausted the transfer size amount of data. The transfer size can<br />

be set to the maximum packet size of the endpoint, to be interrupted at the end of each<br />

packet.<br />

The core decrements this field every time a packet from the external memory is written to the<br />

TxFIFO.<br />

1099/1416 Doc ID 018909 Rev 3

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

Saved successfully!

Ooh no, something went wrong!