Skip to content

Commit 4f09921

Browse files
committed
docs: renumber workflow section and update STM32 USB FS buffering notes
1 parent e545f6a commit 4f09921

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

docs/proj_man/gen_main.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static void XRobotMain(LibXR::HardwareContainer &hw) {
123123

124124
---
125125

126-
## 8. 典型工作流推荐
126+
## 7. 典型工作流推荐
127127

128128
1. 确保每个模块头文件包含 `=== MODULE MANIFEST` 注释块
129129
2. 运行 `xrobot_gen_main` 自动生成配置和主函数

docs/xrusb/plat_ep_dev/stm32_usb.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ STM32一共有四种USB设备,如下所示。可以参考代码生成工具自
1616
| USB_OTG_FS | 主机/从机 | 双向 | 支持 | 不支持 |
1717
| USB_OTG_HS | 主机/从机 | 双向 | 支持 | 支持 |
1818

19+
由于STM32的USB_DEVICE_FS不支持DMA,所以硬件双缓冲的加速作用并不高于LibXR的软件双缓冲区。而且会大量占用宝贵的PMA内存,不推荐使用硬件双缓冲。
20+
1921
## USB_DEVICE_FS/USB_DRV_FS
2022

2123
支持两种端点的声明方式,缓冲区端点号自动递增:
@@ -25,9 +27,10 @@ STM32一共有四种USB设备,如下所示。可以参考代码生成工具自
2527
- usb_fs_ep0_out_buf: EP0 OUT软件缓冲区大小
2628
- 8: EP0 IN硬件RAM大小
2729
- 8: EP0 OUT硬件RAM大小
28-
2. `{usb_fs_ep2_in_buf, 16, true}`:声明一个单向端点使用硬件双缓冲
30+
2. `{usb_fs_ep2_in_buf, 16, true}`:声明一个单向端点 ~~使用硬件双缓冲~~
2931
- usb_fs_ep2_in_buf: EP2 IN软件缓冲区数组
3032
- 16: EP2 IN硬件RAM大小
33+
- bool: 是in方向
3134

3235
为了确保传输速度,对于bulk端点,硬件RAM大小应当不小于64,软件缓冲区可以远大于64,大小与传输速度成正比。
3336

i18n/en/docusaurus-plugin-content-docs/current/proj_man/gen_main.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static void XRobotMain(LibXR::HardwareContainer &hw) {
123123

124124
---
125125

126-
## 8. Recommended Workflow
126+
## 7. Recommended Workflow
127127

128128
1. Ensure each module header includes a `=== MODULE MANIFEST` comment block
129129
2. Run `xrobot_gen_main` to generate configuration and main function

i18n/en/docusaurus-plugin-content-docs/current/xrusb/plat_ep_dev/stm32_usb.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ Two endpoint declaration styles are supported; endpoint numbers for the buffers
2525
- usb_fs_ep0_out_buf: EP0 OUT software buffer array
2626
- 8: EP0 IN hardware RAM size
2727
- 8: EP0 OUT hardware RAM size
28-
2. `{usb_fs_ep2_in_buf, 16, true}`: declares a unidirectional endpoint using hardware double buffering
28+
2. `{usb_fs_ep2_in_buf, 16, true}`: declares a unidirectional endpoint ~~using hardware double buffering~~
2929
- usb_fs_ep2_in_buf: EP2 IN software buffer array
3030
- 16: EP2 IN hardware RAM size
31+
- bool: is in direction
3132

3233
To ensure throughput, for Bulk endpoints the hardware RAM size should be no less than 64. The software buffer can be much larger than 64, and its size is proportional to transfer speed.
3334

0 commit comments

Comments
 (0)