![ARTERY AT32F435 Series Скачать руководство пользователя страница 421](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592421.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 421
Rev 2.03
The OTGFS supports SOF and OE pulse features: a SOF pulse generates at a SOF packet, the pulse
can output to pins and the timer 2; an OE pulse generates when the OTGFS outputs data, the pulse can
output to pins.
Suspend mode is supported. The OTGFS goes into power-saving mode after Suspend mode is entered.
As a device, a unified FIFO buffer is allocated for all OUT endpoints, and a separate FIFO buffer is
provided to each of IN endpoints. As a host, a unified receive FIFO is allocated for all receive channels,
a unified transmit FIFO for all non-periodic transmit channels, and a unified transmit FIFO for all periodic
transmit channels.
If the STOPPCLK is set in the OTGFS_PCGCCTL register, the OTGFS enters Suspend mode when the
bus signal is not received for 3ms. The LP_MODE bit in the OTGFS_GCCFG register can be used to
disable PHY receive in order to reduce power consumption.
21.3 OTGFS clock and pin configuration
21.3.1 OTGFS clock configuration
The OTGFS interface has two clocks: USB control clock and APB bus clock. The USB full-speed device
bus speed standard is 12Mb/s
±
0.25%, so it is necessary to supply 48MHz
±
0.25% for the OTGFS to
perform USB bus sampling.
USBFS 48M clock has two sources:
HICK 48M
When the HICK 48M clock is used as a USB control clock, it is recommended to enable ACC feature.
Divided by PLL
The PLL output frequency must ensure that the USBDIV (see CRM_CFG register) can be divided
to 48MHz.
Note: The APB clock frequency must be greater than 30MHz when OTGFS is enabled.
21.3.2 OTGFS pin configuration
When the USB module is enabled in the CRM, PA11 and PA12 can be multiplexed as DP/DM; PA8 can
be multiplexed as SOF output and configured as a push-pull multiplexed output feature.
The OTGFS input/output pins are multiplexed with GPIOs. The GPIOs are used as OTGFS in one of
the following conditions:
Table 21-1 OTGFS input/output pins
Pin
GPIO
Description
OTGFS1_SOF
PA8
Enable OTG1 in CRM, and configure PA8 multiplexed function register
as 0xA
OTGFS1_VBUS
PA9
Configure PA9 as multiplexed function mode and PA9 multiplexed
function register as 0xA
OTGFS1_ID
PA10
Enable OTG1 in CRM, configure PA10 as multiplexed function mode
and PA10 multiplexed function register as 0xA configure
OTGFS1_D-
PA11
Enable OTG1 in CRM, configure PA11 multiplexed function register
as 0xA, and set PWRDOWN=1
O
PA12
Enable OTG1 in CRM, configure PA12 multiplexed function register
as 0xA, and set PWRDOWN=1
OTGFS1_OE
PA13
Enable OTG1 in CRM, and configure PA13 multiplexed function
register as 0xA
OTGFS2_SOF
PA4
Enable OTG2 in CRM, and configure PA4 multiplexed function
register as 0xC
OTGFS2_VBUS
PB13
Configure PB13 as multiplexed function mode and PB13 multiplexed
function register as 0xC
OTGFS2_ID
PB12
Enable OTG2 in CRM, configure PB12 as multiplexed function mode
and PB12 multiplexed function register as 0xC
OTGFS2_D-
PB14
Enable OTG2 in CRM, configure PB14 multiplexed function register
as 0xC, and set PWRDOWN=1
O
PB15
Enable OTG2 in CRM, configure PB15 multiplexed function register