
RM0008
Note:
Universal serial bus full-speed device interface (USB)
Bit 15 BL_SIZE: BLock size
This bit selects the size of memory block used to define the allocated buffer area.
– If BL_SIZE=0, the memory block is 2 byte large, which is the minimum block allowed in a
word-wide memory. With this block size the allocated buffer size ranges from 2 to 62 bytes.
– If BL_SIZE=1, the memory block is 32 byte large, which allows to reach the maximum
packet length defined by USB specifications. With this block size the allocated buffer size
ranges from 32 to 1024 bytes, which is the longest packet size allowed by USB standard
specifications.
Bits 14:10 NUM_BLOCK[4:0]: Number of blocks
These bits define the number of memory blocks allocated to this packet buffer. The actual
amount of allocated memory depends on the BL_SIZE value as illustrated in
Table 160 .Bits 9:0 COUNTn_RX[9:0]: Reception byte count
These bits contain the number of bytes received by the endpoint associated with the
USB_EPnR register during the last OUT/SETUP transaction addressed to it.
Double-buffered and Isochronous IN Endpoints have two USB_COUNTn_TX
registers: named USB_COUNTn_TX_1 and USB_COUNTn_TX_0 with the
following content.
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
BLSIZE
_1
NUM_BLOCK_1[4:0]
COUNTn_RX_1[9:0]
rw
15
rw
14
rw
13
rw
12
rw
11
rw
10
r
9
r
8
r
7
r
6
r
5
r
4
r
3
r
2
r
1
r
0
BLSIZE
_0
NUM_BLOCK_0[4:0]
COUNTn_RX_0[9:0]
rw
rw
rw
rw
rw
rw
r
r
r
r
r
r
r
r
r
r
Table 160. Definition of allocated buffer memory
Value of
NUM_BLOCK[4:0]
0 (‘00000’)
1 (‘00001’)
2 (‘00010’)
3 (‘00011’)
...
15 (‘01111’)
16 (‘10000’)
17 (‘10001’)
18 (‘10010’)
...
30 (‘11110’)
31 (‘11111’)
Memory allocated
when BL_SIZE=0
Not allowed
2 bytes
4 bytes
6 bytes
...
30 bytes
32 bytes
34 bytes
36 bytes
...
60 bytes
62 bytes
Doc ID 13902 Rev 9
Memory allocated
when BL_SIZE=1
32 bytes
64 bytes
96 bytes
128 bytes
...
512 bytes
N/A
N/A
N/A
...
N/A
N/A
539/995