AT32F425
Series Reference Manual
2022.03.30
Page 344
Ver 2.01
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 unfied 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.
20.3
OTGFS clock and pin configuration
20.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.
20.3.2 OTGFS pin configuration
The OTGFS input/output pins are multiplexed with GPIOs. The GPIOs are used as OTGFS in one of
the following conditions:
Table 20-1 OTGFS input/output pins
Pin
GPIO
Description
OTGFS_SOF
PA8
Enable OTG in CRM, and configure PA8 multiplexed function register
as 0x3
OTGFS_VBUS
PA9
Configure PA9 as multiplexed function mode and PA9 multiplexed
function register as 0x3
OTGFS_ID
PA10
Enable OTG in CRM, configure PA10 as multiplexed function mode
and PA10 multiplexed function register as 0x3
OTGFS_D-
PA11
Enable OTG in CRM, and PWRDOWN=1
PA12
Enable OTG in CRM, and PWRDOWN=1
OTGFS_OE
PA13
Enable OTG1 in CRM, and configure PA13 multiplexed function
register as 0xA
OTGFS2_SOF
PA4
Enable OTG in CRM, and configure PA4 multiplexed function register
as 0x2
PA13
Enable OTG in CRM, and configure PA13 multiplexed function
register as 0x2
PA15
Enable OTG in CRM, and configure PA15 multiplexed function
register as 0x5
PC9
Enable OTG in CRM, and configure PC9 multiplexed function
register as 0x5