![ARTERY AT32F435 Series Reference Manual Download Page 463](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592463.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 463
Rev 2.03
1: PTXFEMP (GINTSTS) interrupt indicates that the
periodic TxFIFO is fully empty
Bit 7
NPTXFEMPLVL
0x0
rw
Accessible 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
Accessible 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
21.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
Accessible 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
Accessible 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 point.
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
Accessible 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 point.
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
Accessible in device mode
USB Turnaround Time
This field sets the turnaround time in PHY clocks. It
defines the response time when the MAC sends a request
to the packet FIFO controller (PFC) to fetch data from the
DFIFO (SPRAM). These bits must be configured as
follows:
0101: When the MAC interface is 16-bit UTMI+
1001: When the MAC interface is 8-bit UTMI+
Note: The aforementioned values are calculated based on
a minimum of 30MHz AHB frequency. The USB
turnaround time is critical for certifications with long
cables and 5-Hub. If you want the AHB to run below 30
MHz, and don’t care about the USB turnaround time, you
can set larger values for these bits.