EasyManua.ls Logo

ST STM32F446 Series

ST STM32F446 Series
1328 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
RM0390 Rev 4 1211/1328
RM0390 USB on-the-go full-speed/high-speed (OTG_FS/OTG_HS)
1264
The channel-specific interrupt service routine for bulk and control OUT/SETUP
transactions is shown in the following code samples.
Interrupt service routine for bulk/control OUT/SETUP and bulk/control IN
transactions
a) Bulk/control OUT/SETUP
Unmask (NAK/TXERR/STALL/XFRC)
if (XFRC)
{
Reset Error Count
Mask ACK
De-allocate Channel
}
else if (STALL)
{
Transfer Done = 1
Unmask CHH
Disable Channel
}
else if (NAK or TXERR )
{
Rewind Buffer Pointers
Unmask CHH
Disable Channel
if (TXERR)
{
Increment Error Count
Unmask ACK
}
else
{
Reset Error Count
}
}
else if (CHH)
{
Mask CHH
if (Transfer Done or (Error_count == 3))
{
De-allocate Channel
}
else
{
Re-initialize Channel
}
}

Table of Contents

Other manuals for ST STM32F446 Series

Related product manuals