AT32WB415
Series Reference Manual
2022.04.13
Page 333
Ver 2.00
20.6.3.5 OTGFS reset register (OTGFS_GRSTCTL)
The application resets various hardware modules in the controller through this register.
Bit
Register
Reset value
Type
Description
Bit 31
AHBIDLE
0x1
ro
Accesible in both host mode and device modes
AHB master Idle
This bit indicates that the AHB master state machine is in
idle condition.
Bit 30: 11 Reserved
0x000
resd
Kept at its default value.
Bit 10: 6
TXFNUM
0x00
rw
Accesible in both host mode and device modes
TxFIFO number
This field indicates the FIFO number that must be
refreshed through the TxFIFO Flush bit. Do not make
changes to this field until the controller clears the TxFIFO
Flush bit.
00000:
- Non-periodic TxFIFO in host mode
- Tx FIFO 0 in device mode
00001:
- Periodic TxFIFO in host mode
- TXFIFO 1 in device mode
00010:
- TXFIFO 2 in device mode
...
01111:
- TXFIFO 15 in device mode
10000:
- Refresh all the transmit FIFOs in device or host mode
Bit 5
TXFFLSH
0x0
rw1s
Accesible in both host mode and device modes
TxFIFO Flush
This bit selectively refreshes a single or all transmit FIFOs,
but can do so when the controller is not in the process of a
transaction.
The application must write this bit only after checking that
the controller is neither writing to nor reading from the
TxFIFO.
Verify using these registers:
Read: NAK effective interrupt (NAK Effective Interrupt)
ensures that the controller is not reading from the FIFO
Write: AHBIDLE bit in GRSTCTL ensures that the
controller is not writing to the FIFO.
For FIFO reprogramming, it is usually recommended to
carry out flushing operaton.
In device endpoint disable state, it is also advised to use
FIFO flushing operation. The application must wait until the
controller clears this bit, before performing other
operations. It takes 8 clocks to clear this bit (slowest of
phy_clk or hclk)
Bit 4
RXFFLSH
0x0
rw1s
Accesible in both host mode and device modes
RxFIFO flush
The application can refresh the entire RxFIFO using this
bit, but must first ensure that the controller is not in the
process of a transaction. The application must only write
to this bit after checking that the controller is neither
reading from nor writing to the RxFIFO.
The application must wait until the controller clears this bit,
before performing other operations. It takes 8 clocks to
clear this bit (slowest of PHY or AHB)
Bit 3
Reserved
0x0
resd
Kept at its default value.
Bit 2
FRMCNTRST
0x0
rw1s
Accesible in both host mode and device modes
Host frame counter reset
The application uses this bit to reset the frame number
counter inside the controller. After the frame counter is
reet, the subsequent SOS sent out by the controller has a