EasyManuals Logo

ST STM32F446 Series User Manual

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
Page #1203 background imageLoading...
Page #1203 background image
RM0390 Rev 4 1203/1328
RM0390 USB on-the-go full-speed/high-speed (OTG_FS/OTG_HS)
1264
31.16 OTG_FS/OTG_HS programming model
31.16.1 Core initialization
The application must perform the core initialization sequence. If the cable is connected
during power-up, the current mode of operation bit in the OTG_GINTSTS (CMOD bit in
OTG_GINTSTS) reflects the mode. The OTG_FS/OTG_HS controller enters host mode
when an “A” plug is connected or device mode when a “B” plug is connected.
This section explains the initialization of the OTG_FS/OTG_HS controller after power-on.
The application must follow the initialization sequence irrespective of host or device mode
operation. All core global registers are initialized according to the core’s configuration:
1. Program the following fields in the OTG_GAHBCFG register:
Global interrupt mask bit GINTMSK = 1
Rx FIFO non-empty (RXFLVL bit in OTG_GINTSTS)
Periodic Tx FIFO empty level
2. Program the following fields in the OTG_GUSBCFG register:
HNP capable bit
SRP capable bit
OTG_FS/OTG_HS timeout calibration field
USB turnaround time field
3. The software must unmask the following bits in the OTG_GINTMSK register:
OTG interrupt mask
Mode mismatch interrupt mask
4. The software can read the CMOD bit in OTG_GINTSTS to determine whether the
OTG_FS/OTG_HS controller is operating in host or device mode.
31.16.2 Host initialization
To initialize the core as host, the application must perform the following steps:

Table of Contents

Other manuals for ST STM32F446 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32F446 Series and is the answer not in the manual?

ST STM32F446 Series Specifications

General IconGeneral
BrandST
ModelSTM32F446 Series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals