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 high-speed (OTG_HS) <strong>RM0090</strong><br />

8. If the periodic request queue depth is smaller than the periodic transfers scheduled<br />

in a micro-frame, a frame overrun condition occurs.<br />

● Handling babble conditions<br />

OTG_HS controller handles two cases of babble: packet babble and port babble.<br />

Packet babble occurs if the device sends more data than the maximum packet size for<br />

the channel. Port babble occurs if the core continues to receive data from the device at<br />

EOF2 (the end of frame 2, which is very close to SOF).<br />

When OTG_HS controller detects a packet babble, it stops writing data into the Rx<br />

buffer and waits for the end of packet (EOP). When it detects an EOP, it flushes already<br />

written data in the Rx buffer and generates a Babble interrupt to the application.<br />

When OTG_HS controller detects a port babble, it flushes the RxFIFO and disables the<br />

port. The core then generates a Port disabled interrupt (HPRTINT in<br />

OTG_HS_GINTSTS, PENCHNG in OTG_HS_HPRT). On receiving this interrupt, the<br />

application must determine that this is not due to an overcurrent condition (another<br />

cause of the Port Disabled interrupt) by checking POCA in OTG_HS_HPRT, then<br />

perform a soft reset. The core does not send any more tokens after it has detected a<br />

port babble condition.<br />

● Bulk and control OUT/SETUP transactions in DMA mode<br />

The sequence of operations is as follows:<br />

a) Initialize and enable channel 1 as explained in Section : Channel initialization.<br />

b) The HS_OTG host starts fetching the first packet as soon as the channel is<br />

enabled. For internal DMA mode, the OTG_HS host uses the programmed DMA<br />

address to fetch the packet.<br />

c) After fetching the last DWORD of the second (last) packet, the OTG_HS host<br />

masks channel 1 internally for further arbitration.<br />

d) The HS_OTG host generates a CHH interrupt as soon as the last packet is sent.<br />

e) In response to the CHH interrupt, de-allocate the channel for other transfers.<br />

● NAK and NYET handling with internal DMA<br />

a) The OTG_HS host sends a bulk OUT transaction.<br />

b) The device responds with NAK or NYET.<br />

c) If the application has unmasked NAK or NYET, the core generates the<br />

corresponding interrupt(s) to the application. The application is not required to<br />

1281/1416 Doc ID 018909 Rev 3

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

Saved successfully!

Ooh no, something went wrong!