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.

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

OTG_FS device control OUT endpoint 0 control register<br />

(OTG_FS_DOEPCTL0)<br />

Address offset: 0xB00<br />

Reset value: 0x0000 8000<br />

This section describes the OTG_FS_DOEPCTL0 register. Nonzero control endpoints use<br />

registers for endpoints 1–3.<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 />

EPENA<br />

EPDIS<br />

Reserved<br />

SNAK<br />

CNAK<br />

Reserved Stall<br />

1091/1416 Doc ID 018909 Rev 3<br />

SNPM<br />

EPTYP<br />

NAKSTS<br />

Reserved<br />

USBAEP<br />

Reserved<br />

w r w w rs rw r r r r r r<br />

Bit 31 EPENA: Endpoint enable<br />

The application sets this bit to start transmitting data on endpoint 0.<br />

The core clears this bit before setting any of the following interrupts on this endpoint:<br />

– SETUP phase done<br />

– Endpoint disabled<br />

– Transfer completed<br />

Bit 30 EPDIS: Endpoint disable<br />

The application cannot disable control OUT endpoint 0.<br />

Bits 29:28 Reserved, must be kept at reset value.<br />

MPSIZ<br />

Bit 27 SNAK: Set NAK<br />

A write to this bit sets the NAK bit for the endpoint.<br />

Using this bit, the application can control the transmission of NAK handshakes on an<br />

endpoint. The core can also set this bit on a Transfer completed interrupt, or after a SETUP<br />

is received on the endpoint.<br />

Bit 26 CNAK: Clear NAK<br />

A write to this bit clears the NAK bit for the endpoint.<br />

Bits 25:22 Reserved, must be kept at reset value.<br />

Bit 21 STALL: STALL handshake<br />

The application can only set this bit, and the core clears it, when a SETUP token is received<br />

for this endpoint. If a NAK bit or Global OUT NAK is set along with this bit, the STALL bit<br />

takes priority. Irrespective of this bit’s setting, the core always responds to SETUP data<br />

packets with an ACK handshake.<br />

Bit 20 SNPM: Snoop mode<br />

This bit configures the endpoint to Snoop mode. In Snoop mode, the core does not check<br />

the correctness of OUT packets before transferring them to application memory.<br />

Bits 19:18 EPTYP: Endpoint type<br />

Hardcoded to 2’b00 for control.

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

Saved successfully!

Ooh no, something went wrong!