29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

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

RM0008<br />

}<br />

else if (STALL)<br />

{<br />

Transfer Done = 1<br />

Unmask CHH<br />

Disable Channel<br />

}<br />

else if (NAK or TXERR )<br />

{<br />

Rewind Buffer Pointers<br />

Unmask CHH<br />

Disable Channel<br />

if (TXERR)<br />

{<br />

Increment Error Count<br />

Unmask ACK<br />

}<br />

else<br />

{<br />

Reset Error Count<br />

}<br />

}<br />

else 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 />

else if (ACK)<br />

{<br />

Reset Error Count<br />

Mask ACK<br />

}<br />

The application is expected to write the data packets into the transmit FIFO as <strong>and</strong><br />

when the space is available in the transmit FIFO <strong>and</strong> the Request queue. The<br />

application can make use of the NPTXFE interrupt in OTG_FS_GINTSTS to find the<br />

transmit FIFO space.<br />

b) Bulk/Control IN<br />

Unmask (TXERR/XFRC/BBERR/STALL/DTERR)<br />

if (XFRC)<br />

{<br />

Reset Error Count<br />

Unmask CHH<br />

Disable Channel<br />

Reset Error Count<br />

798/995 Doc ID 13902 Rev 9

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

Saved successfully!

Ooh no, something went wrong!