Table 410. Definition Of Allocated Buffer Memory - ST STM32G4 Series Reference Manual

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

Advertisement

Universal serial bus full-speed device interface (USB)
enumeration process according to its maxPacketSize parameter value (See "Universal
Serial Bus Specification").
Bit 15 BL_SIZE: Block size
Bits 14:10 NUM_BLOCK[4:0]: Number of blocks
Bits 9:0 COUNTn_RX[9:0]: Reception byte count
NUM_BLOCK[4:0]
1996/2083
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 half-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 theoretically ranges from 32 to 1024 bytes, which is the longest
packet size allowed by USB standard specifications. However, the applicable size is
limited by the available buffer memory.
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
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.

Table 410. Definition of allocated buffer memory

Value of
0 ('00000)
1 ('00001)
2 ('00010)
3 ('00011)
...
14 ('01110)
15 ('01111)
16 ('10000)
...
29 ('11101)
30 ('11110)
31 ('11111)
Memory allocated
when BL_SIZE=0
Not allowed
2 bytes
4 bytes
6 bytes
...
28 bytes
30 bytes
32 bytes
...
58 bytes
60 bytes
62 bytes
RM0440 Rev 1
RM0440
Table
410.
Memory allocated
when BL_SIZE=1
32 bytes
64 bytes
96 bytes
128 bytes
...
480 bytes
...
N/A

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32G4 Series and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF