Skip to content

Commit d2e6f62

Browse files
Merge pull request #343 from leeebo/fix/usb_host_menuconfig
fix(usb): clarify hardware fifo size description in menuconfig
2 parents f4a28bb + e849878 commit d2e6f62

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

host/usb/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
1010

1111
- Global suspend/resume (https://github.com/espressif/esp-usb/pull/275)
1212

13+
### Fixed
14+
15+
- Hardware FIFO size biasing Kconfig now shows allocation formulas instead of chip-specific examples
16+
1317
## [1.0.1] - 2025-10-16
1418

1519
### Fixed

host/usb/Kconfig

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,28 @@ menu "USB-OTG"
2121
FIFOS: RX (for all IN packets), Non-periodic TX (for Bulk and Control OUT packets), and Periodic TX
2222
(for Interrupt and Isochronous OUT packets). This configuration option allows biasing the FIFO sizes
2323
towards a particular use case, which may be necessary for devices that have endpoints with large MPS.
24-
The MPS limits for each biasing are listed below:
24+
25+
The FIFO allocation formulas (where D = otg_dfifo_depth, Total = Total available FIFO size in lines):
2526

2627
Balanced:
27-
- IN (all transfer types), 408 bytes
28-
- OUT non-periodic (Bulk/Control), 192 bytes (i.e., 3 x 64 byte packets)
29-
- OUT periodic (Interrupt/Isochronous), 192 bytes
28+
- IN (RX FIFO) = Total - D/4 - D/8
29+
- OUT non-periodic (Non-periodic TX FIFO) = D/4
30+
- OUT periodic (Periodic TX FIFO) = D/8
3031

3132
Bias IN:
32-
- IN (all transfer types), 600 bytes
33-
- OUT non-periodic (Bulk/Control), 64 bytes (i.e., 1 x 64 byte packets)
34-
- OUT periodic (Interrupt/Isochronous), 128 bytes
33+
- IN (RX FIFO) = Total - D/16 - D/8
34+
- OUT non-periodic (Non-periodic TX FIFO) = D/16
35+
- OUT periodic (Periodic TX FIFO) = D/8
3536

3637
Bias Periodic OUT:
37-
- IN (all transfer types), 128 bytes
38-
- OUT non-periodic (Bulk/Control), 64 bytes (i.e., 1 x 64 byte packets)
39-
- OUT periodic (Interrupt/Isochronous), 600 bytes
38+
- IN (RX FIFO) = D/8 + 2 (2 extra lines for status information)
39+
- OUT non-periodic (Non-periodic TX FIFO) = D/16
40+
- OUT periodic (Periodic TX FIFO) = Total - D/16 - (D/8 + 2)
41+
42+
Note:
43+
- Each line = 4 bytes. To convert FIFO size: bytes = lines × 4
44+
- D (otg_dfifo_depth) is typically 256 for FS PHY, 1024 for HS PHY (chip-dependent)
45+
- Total is slightly less than D due to controller overhead
4046

4147
config USB_HOST_HW_BUFFER_BIAS_BALANCED
4248
bool "Balanced"

0 commit comments

Comments
 (0)