Endpoint-Specific Registers - ST STM32F101 series Reference Manual

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32F101 series:
Table of Contents

Advertisement

Universal serial bus full-speed device interface (USB)
23.5.2

Endpoint-specific registers

The number of these registers varies according to the number of endpoints that the USB
peripheral is designed to handle. The USB peripheral supports up to 8 bidirectional
endpoints. Each USB device must support a control endpoint whose address (EA bits) must
be set to 0. The USB peripheral behaves in an undefined way if multiple endpoints are
enabled having the same endpoint number value. For each endpoint, an USB_EPnR
register is available to store the endpoint specific information.
USB endpoint n register (USB_EPnR), n=[0..7]
Address offset: 0x00 to 0x1C
Reset value: 0x0000
15
14
13
CTR_
DTOG_
STAT_RX[1:0]
RX
RX
rc_w0
t
t
They are also reset when an USB reset is received from the USB bus or forced through bit
FRES in the CTLR register, except the CTR_RX and CTR_TX bits, which are kept
unchanged to avoid missing a correct packet notification immediately followed by an USB
reset event. Each endpoint has its USB_EPnR register where n is the endpoint identifier.
Read-modify-write cycles on these registers should be avoided because between the read
and the write operations some bits could be set by the hardware and the next write would
modify them before the CPU has the time to detect the change. For this purpose, all bits
affected by this problem have an 'invariant' value that must be used whenever their
modification is not required. It is recommended to modify these registers with a load
instruction where all the bits, which can be modified only by the hardware, are written with
their 'invariant' value.
635/1128
12
11
10
9
EP
SETUP
TYPE[1:0]
t
r
rw
rw
DocID13902 Rev 15
8
7
6
5
EP_
CTR_
DTOG_
STAT_TX[1:0]
KIND
TX
TX
rw
rc_w0
t
4
3
2
EA[3:0]
t
t
rw
rw
RM0008
1
0
rw
rw

Advertisement

Table of Contents
loading

This manual is also suitable for:

Stm32f107 seriesStm32f102 seriesStm32f103 seriesStm32f105 seriesStm32f101 series

Table of Contents