29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

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

RM0008<br />

●<br />

on which the transfer is not completed in the current frame. This interrupt is<br />

asserted along with the end of periodic frame interrupt (GINTSTS/EOPF).<br />

3 OUT endpoints<br />

– each of them can be configured to support the isochronous, bulk or interrupt<br />

transfer type<br />

– each of them has a proper control (DOEPCTLx), transfer configuration<br />

(DOEPTSIZx) <strong>and</strong> status-interrupt (DOEPINTx) register<br />

– Device Out endpoints common interrupt mask register (DOEPMSK) is available to<br />

enable/disable a single kind of endpoint interrupt source on all of the OUT<br />

endpoints (EP0 included)<br />

– support incomplete isochronous OUT transfer interrupt (INCOMPISOOUT bit in<br />

OTG_FS_GINTSTS), asserted when there is at least one isochronous OUT<br />

endpoint on which the transfer is not completed in the current frame. This interrupt<br />

is asserted along with the end of periodic frame interrupt (GINTSTS/EOPF).<br />

Endpoint control<br />

●<br />

The following endpoint controls are available to the application through the device<br />

endpoint-x IN/OUT control register (DIEPCTLx/DOEPCTLx):<br />

– endpoint enable/disable<br />

– endpoint activation in current configuration<br />

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

– program the supported packet size<br />

– program the Tx-FIFO number associated with the IN endpoint<br />

– program the expected or transmitted data0/data1 PID (bulk/interrupt only)<br />

– program the even/odd frame during which the transaction is received or<br />

transmitted (isochronous only)<br />

– optionally program the NAK bit to always negative-acknowledge the host<br />

regardless of the FIFO status<br />

– optionally program the STALL bit to always stall host tokens to that endpoint<br />

– optionally program the SNOOP mode for OUT endpoint not to check the CRC field<br />

of received data<br />

Endpoint transfer<br />

The device endpoint-x transfer size registers (DIEPTSIZx/DOEPTSIZx) allow the application<br />

to program the transfer size parameters <strong>and</strong> read the transfer status. Programming must be<br />

done before setting the endpoint enable bit in the endpoint control register. Once the<br />

endpoint is enabled, these fields are read-only as the OTG FS core updates them with the<br />

current transfer status.<br />

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

– transfer size in bytes<br />

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

Endpoint status/interrupt<br />

The device endpoint-x interrupt registers (DIEPINTx/DOPEPINTx) indicate the status of an<br />

endpoint with respect to USB- <strong>and</strong> AHB-related events. The application must read these<br />

registers when the OUT endpoint interrupt bit or the IN endpoint interrupt bit in the core<br />

702/995 Doc ID 13902 Rev 9

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

Saved successfully!

Ooh no, something went wrong!