Skip to content

Commit 8515e47

Browse files
committed
Update comment
Signed-off-by: HiFiPhile <[email protected]>
1 parent 7810b58 commit 8515e47

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/portable/st/stm32_fsdev/fsdev_stm32.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,10 @@
268268
#endif
269269

270270
#ifndef CFG_TUD_FSDEV_DOUBLE_BUFFERED_ISO_EP
271-
// Defaults to double-buffered isochronous endpoints on devices with >1KB PMA
271+
// Default configuration for double-buffered isochronous endpoints:
272+
// - Enable double buffering on devices with >1KB Packet Memory Area (PMA)
273+
// to improve isochronous transfer reliability and performance
274+
// - Disable on devices with limited PMA to conserve memory space
272275
#if FSDEV_PMA_SIZE > 1024u
273276
#define CFG_TUD_FSDEV_DOUBLE_BUFFERED_ISO_EP 1
274277
#else
@@ -277,12 +280,16 @@
277280
#endif
278281

279282
#if FSDEV_HAS_SBUF_ISO != 0 && CFG_TUD_FSDEV_DOUBLE_BUFFERED_ISO_EP == 0
280-
// If hardware has SBUF_ISO bit single-buffered endpoints consume only
281-
// one half of endpoint pair register.
283+
// SBUF_ISO configuration:
284+
// - Some STM32 devices have special hardware support for single-buffered isochronous endpoints
285+
// - When SBUF_ISO bit is available and double buffering is disabled:
286+
// Enable SBUF_ISO to optimize endpoint register usage (one half of endpoint pair register)
282287
#define FSDEV_USE_SBUF_ISO 1
283288
#else
284-
// Otherwise it consumes entire endpoint pair but we can at least save
285-
// memory by configuring the same buffer twice.
289+
// When either:
290+
// - Hardware doesn't support SBUF_ISO feature, or
291+
// - Double buffering is enabled for isochronous endpoints
292+
// We must use the entire endpoint pair register
286293
#define FSDEV_USE_SBUF_ISO 0
287294
#endif
288295

0 commit comments

Comments
 (0)