
DocID024597 Rev 5
RM0351
USB on-the-go full-speed (OTG_FS)
1774
47.15.31 Device-mode registers
These registers must be programmed every time the core changes to device mode
47.15.32 OTG device
configuration register (OTG_DCFG)
Address offset: 0x800
Reset value: 0x0220 0000
This register configures the core in device mode after power-on or after certain control
commands or enumeration. Do not make changes to this register after initial programming.
Bit 31 Reserved, must be kept at reset value.
Bits 30:29
DPID:
Data PID
The application programs this field with the type of PID to use for the initial transaction. The
host maintains this field for the rest of the transfer.
00: DATA0
10: DATA1
11: SETUP (control) / reserved (non-control)
Bits 28:19
PKTCNT:
Packet count
This field is programmed by the application with the expected number of packets to be
transmitted (OUT) or received (IN).
The host decrements this count on every successful transmission or reception of an OUT/IN
packet. Once this count reaches zero, the application is interrupted to indicate normal
completion.
Bits 18:0
XFRSIZ:
Transfer size
For an OUT, this field is the number of data bytes the host sends during the transfer.
For an IN, this field is the buffer size that the application has reserved for the transfer. The
application is expected to program this field as an integer multiple of the maximum packet
size for IN transactions (periodic and non-periodic).
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
Res.
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
ERRAT
IM
(1)
Res.
Res.
PFIVL
DAD
Res.
NZLSO
HSK
DSPD
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
1. This bit is reserved for STM32L475xx/476xx/486xx devices.
Bits 31:16 Reserved, must be kept at reset value .
Bit 15
ERRATIM:
Erratic error interrupt mask
1: Mask early suspend interrupt on erratic error
0: Early suspend interrupt is generated on erratic error
Note: This bit is available in STM32L49x/4Ax products, reserved otherwise.
Bits 14:13 Reserved, must be kept at reset value.