Universal serial bus full-speed device interface (USB) RM0367
928/1043 RM0367 Rev 7
back accesses. The USB peripheral logic uses a dedicated clock. The frequency of this
dedicated clock is fixed by the requirements of the USB standard at 48 MHz, and this can be
different from the clock used for the interface to the APB bus. Different clock configurations
are possible where the APB clock frequency can be higher or lower than the USB peripheral
one.
Note: Due to USB data rate and packet memory interface requirements, the APB clock must have
a minimum frequency of 10 MHz to avoid data overrun/underrun problems.
Each endpoint is associated with two packet buffers (usually one for transmission and the
other one for reception). Buffers can be placed anywhere inside the packet memory
because their location and size is specified in a buffer description table, which is also
located in the packet memory at the address indicated by the USB_BTABLE register. Each
table entry is associated to an endpoint register and it is composed of four 16-bit half-words
so that table start address must always be aligned to an 8-byte boundary (the lowest three
bits of USB_BTABLE register are always “000”). Buffer descriptor table entries are
described in the Section 32.6.2: Buffer descriptor table. If an endpoint is unidirectional and it
is neither an Isochronous nor a double-buffered bulk, only one packet buffer is required (the
one related to the supported transfer direction). Other table locations related to unsupported
transfer directions or unused endpoints, are available to the user. Isochronous and double-
buffered bulk endpoints have special handling of packet buffers (Refer to Section 32.5.4:
Isochronous transfers and Section 32.5.3: Double-buffered endpoints respectively). The
relationship between buffer description table entries and packet buffer areas is depicted in
Figure 314.
Figure 314. Packet buffer areas with examples of buffer description table locations
MSv32129V1
0001_1110 (1E)
COUNT3_TX_1
ADDR3_TX_1
COUNT3_TX_0
ADDR3_TX_0
COUNT2_RX_1
ADDR2_RX_1
COUNT2_RX_0
ADDR2_RX_0
COUNT1_RX
ADDR1_RX
COUNT1_TX
ADDR1_TX
COUNT0_RX
ADDR0_RX
COUNT0_TX
ADDR0_TX
0001_1100 (1C)
0001_1010 (1A)
0001_1000 (18)
0001_0110 (16)
0001_0100 (14)
0001_0010 (12)
0001_0000 (10)
0000_1110 (0E)
0000_1100 (0C)
0000_1010 (0A)
0000_1000 (08)
0000_0110 (06)
0000_0100 (04)
0000_0010 (02)
0000_0000 (00)
Buffer description table locations
Buffer for
double-buffered
IN Endpoint 3
Buffer for
double-buffered
OUT Endpoint 2
Transmission
buffer for
single-buffered
Endpoint 1
Reception buffer
for
Endpoint 0
Transmission
buffer for
Endpoint 0
Packet buffers