summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-04-26 10:14:31 +0700
committerhathach <[email protected]>2026-04-26 10:14:31 +0700
commit5ba472d5c9777e83523d7db718743e3cd5c8761a (patch)
tree21024eddf067bd615b14dea1fa26b25d3201eb5a /examples
parentef2f24cddbce107c80f43e1e8f8a3cd1bf763d84 (diff)
shrink cdc_msc_throughput MSC buffer for FS targets
CFG_TUD_MSC_EP_BUFSIZE: 4096 → (HS ? 4096 : 1024). Keep the big buffer for HS where it actually amortises CBW overhead at iperf-class throughput; FS peaks around ~830 kBps so 1 KB is plenty and the example now fits on small-RAM MCUs (lpc11/13, samd11, kinetis_kl, stm32f0/l0, stm32f1, etc.). Also dedupe CDC_TX_BUFSIZE = CDC_RX_BUFSIZE. Drops the previously-needed skip.txt — verified builds locally on lpcxpresso1347, cynthion_d11, lpcxpresso11u37/u68, stm32f072disco/eval, frdm_kl25z, stm32l052dap52. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Diffstat (limited to 'examples')
-rw-r--r--examples/device/cdc_msc_throughput/skip.txt23
-rw-r--r--examples/device/cdc_msc_throughput/src/tusb_config.h4
2 files changed, 2 insertions, 25 deletions
diff --git a/examples/device/cdc_msc_throughput/skip.txt b/examples/device/cdc_msc_throughput/skip.txt
deleted file mode 100644
index ab62e8091..000000000
--- a/examples/device/cdc_msc_throughput/skip.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-mcu:CH32V103
-mcu:CH32V20X
-mcu:LPC11UXX
-mcu:LPC13XX
-mcu:LPC15XX
-mcu:MCXA15
-mcu:MSP430x5xx
-mcu:NUC121
-mcu:SAMD11
-mcu:STM32L0
-mcu:STM32F0
-mcu:KINETIS_KL
-mcu:STM32H7RS
-mcu:STM32N6
-family:broadcom_64bit
-family:broadcom_32bit
-family:espressif
-board:at_start_f425
-board:curiosity_nano
-board:frdm_kl25z
-family:lpc55
-family:nuc126
-family:nuc100_120
diff --git a/examples/device/cdc_msc_throughput/src/tusb_config.h b/examples/device/cdc_msc_throughput/src/tusb_config.h
index 0a0d6dca9..6c8655719 100644
--- a/examples/device/cdc_msc_throughput/src/tusb_config.h
+++ b/examples/device/cdc_msc_throughput/src/tusb_config.h
@@ -85,7 +85,7 @@ extern "C" {
// Large MSC bulk buffer: host transfers big CBW payloads (e.g. dd bs=1M does 64KiB
// chunks). A 4K per-bulk-IO buffer lets the class driver amortise the per-CBW
// overhead across many USB packets, approximating the maximum USB bulk throughput.
-#define CFG_TUD_MSC_EP_BUFSIZE 4096
+#define CFG_TUD_MSC_EP_BUFSIZE (TUD_OPT_HIGH_SPEED ? 4096 : 1024)
// #define CFG_TUD_CDC_TX_PERSISTENT 1
@@ -94,7 +94,7 @@ extern "C" {
#define CFG_TUD_CDC_TX_EPSIZE CFG_TUD_CDC_RX_EPSIZE
#define CFG_TUD_CDC_RX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 2*512 : 2*64)
-#define CFG_TUD_CDC_TX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 2*512 : 2*64)
+#define CFG_TUD_CDC_TX_BUFSIZE CFG_TUD_CDC_RX_BUFSIZE
#ifdef __cplusplus
}