summaryrefslogtreecommitdiff
path: root/examples/device/cdc_msc_throughput/src
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/device/cdc_msc_throughput/src
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/device/cdc_msc_throughput/src')
-rw-r--r--examples/device/cdc_msc_throughput/src/tusb_config.h4
1 files changed, 2 insertions, 2 deletions
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
}