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.

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

The suspended state can be optionally exited on the remote device’s initiative (remote<br />

wakeup). In this case the remote wakeup interrupt (WKUPINT bit in OTG_FS_GINTSTS) is<br />

generated upon detection of a remote wakeup signaling, the port resume bit in the host port<br />

control and status register (PRES bit in OTG_FS_HPRT) self-sets, and resume signaling is<br />

automatically driven over the USB. The application must time the resume window and then<br />

clear the port resume bit to exit the suspended state and restart the SOF.<br />

If the suspended state is exited on the host initiative, the application must set the port<br />

resume bit to start resume signaling on the host port, time the resume window and finally<br />

clear the port resume bit.<br />

30.6.3 Host channels<br />

The OTG_FS core instantiates 8 host channels. Each host channel supports an USB host<br />

transfer (USB pipe). The host is not able to support more than 8 transfer requests at the<br />

same time. If more than 8 transfer requests are pending from the application, the host<br />

controller driver (HCD) must re-allocate channels when they become available from<br />

previous duty, that is, after receiving the transfer completed and channel halted interrupts.<br />

Each host channel can be configured to support in/out and any type of periodic/nonperiodic<br />

transaction. Each host channel makes us of proper control (HCCHARx), transfer<br />

configuration (HCTSIZx) and status/interrupt (HCINTx) registers with associated mask<br />

(HCINTMSKx) registers.<br />

Host channel control<br />

● The following host channel controls are available to the application through the host<br />

channel-x characteristics register (HCCHARx):<br />

– Channel enable/disable<br />

– Program the FS/LS speed of target USB peripheral<br />

– Program the address of target USB peripheral<br />

– Program the endpoint number of target USB peripheral<br />

– Program the transfer IN/OUT direction<br />

– Program the USB transfer type (control, bulk, interrupt, isochronous)<br />

– Program the maximum packet size (MPS)<br />

– Program the periodic transfer to be executed during odd/even frames<br />

Host channel transfer<br />

The host channel transfer size registers (HCTSIZx) allow the application to program the<br />

transfer size parameters, and read the transfer status. Programming must be done before<br />

setting the channel enable bit in the host channel characteristics register. Once the endpoint<br />

is enabled the packet count field is read-only as the OTG FS core updates it according to the<br />

current transfer status.<br />

● The following transfer parameters can be programmed:<br />

– transfer size in bytes<br />

– number of packets making up the overall transfer size<br />

– initial data PID<br />

Doc ID 018909 Rev 3 1030/1416

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

Saved successfully!

Ooh no, something went wrong!