summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2025-09-12 16:49:55 +0200
committerHiFiPhile <[email protected]>2025-09-12 16:49:55 +0200
commit8515e47ad9980f8ad380913bda72425b1bb83648 (patch)
tree675174d31cb346a87694a132b14ce3d23f32dc5f /src
parent7810b5816123b0bb4deed27a0367c91919d39238 (diff)
Update comment
Signed-off-by: HiFiPhile <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/portable/st/stm32_fsdev/fsdev_stm32.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/portable/st/stm32_fsdev/fsdev_stm32.h b/src/portable/st/stm32_fsdev/fsdev_stm32.h
index 770baa05a..95f40269a 100644
--- a/src/portable/st/stm32_fsdev/fsdev_stm32.h
+++ b/src/portable/st/stm32_fsdev/fsdev_stm32.h
@@ -268,7 +268,10 @@
#endif
#ifndef CFG_TUD_FSDEV_DOUBLE_BUFFERED_ISO_EP
- // Defaults to double-buffered isochronous endpoints on devices with >1KB PMA
+ // Default configuration for double-buffered isochronous endpoints:
+ // - Enable double buffering on devices with >1KB Packet Memory Area (PMA)
+ // to improve isochronous transfer reliability and performance
+ // - Disable on devices with limited PMA to conserve memory space
#if FSDEV_PMA_SIZE > 1024u
#define CFG_TUD_FSDEV_DOUBLE_BUFFERED_ISO_EP 1
#else
@@ -277,12 +280,16 @@
#endif
#if FSDEV_HAS_SBUF_ISO != 0 && CFG_TUD_FSDEV_DOUBLE_BUFFERED_ISO_EP == 0
- // If hardware has SBUF_ISO bit single-buffered endpoints consume only
- // one half of endpoint pair register.
+ // SBUF_ISO configuration:
+ // - Some STM32 devices have special hardware support for single-buffered isochronous endpoints
+ // - When SBUF_ISO bit is available and double buffering is disabled:
+ // Enable SBUF_ISO to optimize endpoint register usage (one half of endpoint pair register)
#define FSDEV_USE_SBUF_ISO 1
#else
- // Otherwise it consumes entire endpoint pair but we can at least save
- // memory by configuring the same buffer twice.
+ // When either:
+ // - Hardware doesn't support SBUF_ISO feature, or
+ // - Double buffering is enabled for isochronous endpoints
+ // We must use the entire endpoint pair register
#define FSDEV_USE_SBUF_ISO 0
#endif