AT32F425
Series Reference Manual
2022.03.30
Page 380
Ver 2.01
reading the OTGFS_DIEPTSIZx register, only transfer size =0 and packet count =0 indicate that all data
are transmitted on the USB line.
8. The assertion of the XFERC interrupt in the OTGFS_DIEPINTx register, with or without the
INTKNTXFEMP interrupt, indicates the successful completion of an interrupt IN transfer. When reading
the OTGFS_DIEPTSIZx register, only transfer size =0 and packet count =0 indicate that all data are
transmitted on the USB line.
9. The assertion of the INCOMPISOIN interrupt but without the above-mentioned interrupts indicates
that the controller did not receive at least one periodic IN token in the current frame. Refer to “Incomplete
synchronous IN data transfers” for more information on synchronous IN endpoints.
20.6
OTGFS control and status registers
The application controls the OTGFS controller by reading from and writing to the control and status
registers (CSRx) through the AHB slave interface. These registers are accessible by 32 bits, and the
addresses are 32-bit aligned.
Only the controller global, power and clock control, data FIFO access and host port control and status
registers are active in both host and device modes. When the OTGFS controller operates in either host
or device mode, the application must not access the register group from the other mode. If an illegal
access occurs, a mode mismatch interrupt is generated and the MODMIS bit (in the OTGFS_GINTSTS
register) is affected.
When the controller switches from one mode to the other, the registers in the new mode must be re-
initialized as they are after a power-on reset. These peripheral registers must be accessed by words
(32-bit)
20.6.1 CSR register map
The host and device mode registers occupy different addresses. All registers are located in the AHB
clock domain
Figure 20-13 CSR memory map
The overall situation of the core CSRs(1024 byte)
Host mode CSRs (1024 byte)
Device mode CSRs (1024 byte)
Power and clock control CSRs (512 byte)
Equipment EP 0/host channel 0 FIFO (4096 byte)
Equipment EP 1/host channel 1 FIFO (4096 byte)
Equipment Epx (1)/host channel x (1) FIFO (4096 byte)
Equipment EP(x-1) (1)/host channel (x-1) (1) FIFO (4096
byte)
Retain
Data directly accessed during debugging FIFO RAM
(131072 byte)
DFIFO
Read/write in
this area
push/pop
DFIFO
Read/write in
this area
during
debugging
0000h
0400h
0800h
0E00h
1000h
2000h
3000h
0F000h
10000h
11000h
20000h
3FFFFh
x = 7 in device mode, x =15 in host mode.