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

else<br />

if (CHH)<br />

{<br />

Mask CHH<br />

De-allocate Channel<br />

}<br />

Code sample: Isochronous IN<br />

Unmask (TXERR/XFRC/FRMOR/BBERR)<br />

if (XFRC or FRMOR)<br />

{<br />

if (XFRC and (OTG_HS_HCTSIZx.PKTCNT == 0))<br />

{<br />

Reset Error Count<br />

De-allocate Channel<br />

}<br />

else<br />

{<br />

Unmask CHH<br />

Disable Channel<br />

}<br />

}<br />

else<br />

if (TXERR or BBERR)<br />

{<br />

Increment Error Count<br />

Unmask CHH<br />

Disable Channel<br />

}<br />

else<br />

if (CHH)<br />

{<br />

Mask CHH<br />

if (Transfer Done or (Error_count == 3))<br />

{<br />

De-allocate Channel<br />

}<br />

else<br />

{<br />

Re-initialize Channel<br />

}<br />

}<br />

1279/1416 Doc ID 018909 Rev 3

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

Saved successfully!

Ooh no, something went wrong!