Skip to content

Commit b37c882

Browse files
Merge branch 'docs/update_cn_translation_for_usb' into 'master'
docs: Provide CN translation for usb device See merge request espressif/esp-idf!38387
2 parents 0181d1b + e664cb0 commit b37c882

File tree

2 files changed

+92
-8
lines changed

2 files changed

+92
-8
lines changed

docs/en/api-reference/peripherals/usb_device.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,11 @@ This approach ensures that USB transactions remain fast while avoiding potential
289289
- Read Speed
290290
- Write Speed
291291

292-
* - 512B
292+
* - 512 B
293293
- 0.566 MB/s
294294
- 0.236 MB/s
295295

296-
* - 8192B
296+
* - 8192 B
297297
- 0.925 MB/s
298298
- 0.928 MB/s
299299

@@ -307,21 +307,23 @@ This approach ensures that USB transactions remain fast while avoiding potential
307307
- Read Speed
308308
- Write Speed
309309

310-
* - 512B
310+
* - 512 B
311311
- 1.174 MB/s
312312
- 0.238 MB/s
313313

314-
* - 8192B
314+
* - 8192 B
315315
- 4.744 MB/s
316316
- 2.157 MB/s
317317

318-
* - 32768B
318+
* - 32768 B
319319
- 5.998 MB/s
320320
- 4.485 MB/s
321321

322322
.. only:: esp32s2
323323

324-
*Note: SD card support is not available for ESP32-S2 in MSC device mode.*
324+
.. note::
325+
326+
SD card support is not available for ESP32-S2 in MSC device mode.
325327

326328
**SPI Flash Performance:**
327329

@@ -332,10 +334,10 @@ This approach ensures that USB transactions remain fast while avoiding potential
332334
* - FIFO Size
333335
- Write Speed
334336

335-
* - 512B
337+
* - 512 B
336338
- 5.59 KB/s
337339

338-
* - 8192B
340+
* - 8192 B
339341
- 21.54 KB/s
340342

341343
Performance Limitations:

docs/zh_CN/api-reference/peripherals/usb_device.rst

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,88 @@ USB 大容量存储设备 (MSC)
266266
};
267267
tinyusb_msc_storage_init_sdmmc(&config_sdmmc);
268268
269+
MSC 性能优化
270+
^^^^^^^^^^^^^^
271+
272+
**single-buffer 方案**
273+
274+
single-buffer 方案通过使用专用 buffer 临时存储接收到的写入数据,而不是在回调中立即处理,从而提升性能。
275+
276+
- **可配置的 buffer 大小**: 通过 ``CONFIG_TINYUSB_MSC_BUFSIZE`` 参数设置 buffer 大小,用户可以根据实际需要,灵活调整性能与存储占用的平衡点。
277+
278+
该方案确保了 USB 传输的效率,同时避免因存储操作可能带来的延迟。
279+
280+
**USB MSC 驱动器性能**
281+
282+
.. only:: esp32s3
283+
284+
.. list-table::
285+
:header-rows: 1
286+
:widths: 20 20 20
287+
288+
* - FIFO 大小
289+
- 读取速度
290+
- 写入速度
291+
292+
* - 512 B
293+
- 0.566 MB/s
294+
- 0.236 MB/s
295+
296+
* - 8192 B
297+
- 0.925 MB/s
298+
- 0.928 MB/s
299+
300+
.. only:: esp32p4
301+
302+
.. list-table::
303+
:header-rows: 1
304+
:widths: 20 20 20
305+
306+
* - FIFO 大小
307+
- 读取速度
308+
- 写入速度
309+
310+
* - 512 B
311+
- 1.174 MB/s
312+
- 0.238 MB/s
313+
314+
* - 8192 B
315+
- 4.744 MB/s
316+
- 2.157 MB/s
317+
318+
* - 32768 B
319+
- 5.998 MB/s
320+
- 4.485 MB/s
321+
322+
.. only:: esp32s2
323+
324+
.. note::
325+
326+
ESP32-S2 在 MSC 设备模式下不支持 SD 卡功能。
327+
328+
**SPI flash 性能:**
329+
330+
.. list-table::
331+
:header-rows: 1
332+
:widths: 20 20
333+
334+
* - FIFO 大小
335+
- 写入速度
336+
337+
* - 512 B
338+
- 5.59 KB/s
339+
340+
* - 8192 B
341+
- 21.54 KB/s
342+
343+
性能限制:
344+
345+
- **内部 SPI flash 性能** 受架构限制影响。程序执行和存储访问共享同一 flash 芯片,导致写入 flash 时必须暂停程序执行,会显著影响性能。
346+
- **内部 SPI flash 主要适用于演示场景**。在需要更高性能的实际应用中,在支持的情况下使用 **外部存储设备**,如 SD 卡或外部 SPI flash 芯片。
347+
348+
.. only:: esp32s3 or esp32p4
349+
350+
SD 卡不受此限制影响,因此能获得更高的性能提升。
269351

270352
应用示例
271353
--------------------

0 commit comments

Comments
 (0)