AT32F425
Series Reference Manual
2022.03.30
Page 386
Ver 2.01
20.6.3.3 OTGFS AHB configuration register (OTGFS_GAHBCFG)
This register is used to configure the controller after power-on or mode change. This register mainly
contains AHB-related parameters. Do not change this register after the initial configuration. The
application must configure this register before starting transmission on either the AHB or USB.
Bit
Register
Reset value
Type
Description
Bit 31: 9
Reserved
0x000000
resd
Kept at its default value.
Bit 8
PTXFEMPLVL
0x0
rw
Accesible in host mode only
Periodic TxFIFO empty level
It indicates when the periodic TxFIFO empty interrupt bit in
the GINTSTS register is triggered.
0: PTXFEMP (GINTSTS) interrupt indicates that the
periodic TxFIFO is half empty
1: PTXFEMP (GINTSTS) interrupt indicates that the
periodic TxFIFO is fully empty
Bit 7
NPTXFEMPLVL
0x0
rw
Accesible in both host mode and device modes
Non-Periodic TxFIFO empty level
In host mode, this bit indicates when the non-periodic
TxFIFO empty interrupt (NPTXFEMP in GINTSTS) is
triggered.
In device mode, this bit indicates when the IN endpoint
TxFIFO empty interrupt (TXFEMP bit in DIEPINTn) is
triggered.
0: The TxFEMP (in DIEPINTn) interrupt indicates that the
IN endpoint TxFIFO is half empty
1: The TxFEMP (in DIEPINTn) interrupt indicates that the
IN endpoint TxFIFO is fully empty
Bit 6: 1
Reserved
0x00
resd
Kept at its default value.
Bit 0
GLBINTMSK
0x0
rw
Accesible in both host mode and device modes
Global interrupt mask
The application uses this bit to mask or unmask the
interrupts sent by the interrupt line to itself.
0: Mask the interrupts sent to the application
1: Unmask the interrupts sent to the application
20.6.3.4 OTGFS USB configuration register (OTGFS_GUSBCFG)
This register is used to configure the controller after power-on or a change between host mode and
device mode. This register contains USB and USB-PHY related parameters. The application must
program the register before handling any transaction on either the AHB or USB. Do not change this
register after the initial configuration.
Bit
Register
Reset value
Type
Description
Bit 31
COTXPKT
0x0
rw
Accesible in both host mode and device modes
Corrupt Tx packet
This bit is for debug purpose only. Do not set this bit to 1.
Bit 30
FDEVMODE
0x0
rw
Accesible in both host mode and device modes
Force device mode
Writing 1 to this bit forces the controller to go into device
mode, irrespective of the status of the ID input poin.
0: Normal mode
1: Force device mode
After setting this bit, the application must wait at least 25ms
before the configuration takes effect.
Bit 29
FHSTMODE
0x0
rw
Accesible in both host mode and device modes
Force host mode
Writing 1 to this bit forces the controller to go into host
mode, irrespective of the status of the ID input poin.
0: Normal mode
1: Force host mode
After setting this bit, the application must wait at least 25ms
before the configuration takes effect.
Bit 28: 15 Reserved
0x0000
resd
Kept at its default value.
Bit 14
Reserved
0x0
resd
Kept at its default value.
Bit 13: 10 USBTRDTIM
0x5
rw
Accesible in device mode