From 96cbbfc1be9df29ea869f462bbc00e012c0bd20d Mon Sep 17 00:00:00 2001 From: sakumisu <1203593632@qq.com> Date: Fri, 9 May 2025 11:52:07 +0800 Subject: docs: add performance show Signed-off-by: sakumisu <1203593632@qq.com> --- docs/source/index.rst | 6 +++ docs/source/show/img/usbdev_msc.png | Bin 0 -> 41061 bytes docs/source/show/img/usbdev_rndis_linux.png | Bin 0 -> 186610 bytes docs/source/show/img/usbdev_rndis_lwip.png | Bin 0 -> 61847 bytes docs/source/show/img/usbdev_rndis_lwip2.png | Bin 0 -> 418408 bytes docs/source/show/img/usbdev_rndis_wifi.png | Bin 0 -> 1000959 bytes docs/source/show/img/usbdev_rndis_wifi2.png | Bin 0 -> 295386 bytes docs/source/show/img/usbdev_rndis_win.png | Bin 0 -> 146421 bytes docs/source/show/img/usbhost_msc.png | Bin 0 -> 13051 bytes docs/source/show/img/usbhost_msc_xhci.png | Bin 0 -> 40182 bytes docs/source/show/img/usbhost_rndis.png | Bin 0 -> 165468 bytes docs/source/show/img/usbhost_rndis2.png | Bin 0 -> 128026 bytes docs/source/show/img/usbhost_uvc.gif | Bin 0 -> 8564084 bytes docs/source/show/img/usbhost_wifi.png | Bin 0 -> 101688 bytes docs/source/show/index.rst | 72 ++++++++++++++++++++++++++++ docs/source/usbdev.svg | 25 ++-------- 16 files changed, 82 insertions(+), 21 deletions(-) create mode 100644 docs/source/show/img/usbdev_msc.png create mode 100644 docs/source/show/img/usbdev_rndis_linux.png create mode 100644 docs/source/show/img/usbdev_rndis_lwip.png create mode 100644 docs/source/show/img/usbdev_rndis_lwip2.png create mode 100644 docs/source/show/img/usbdev_rndis_wifi.png create mode 100644 docs/source/show/img/usbdev_rndis_wifi2.png create mode 100644 docs/source/show/img/usbdev_rndis_win.png create mode 100644 docs/source/show/img/usbhost_msc.png create mode 100644 docs/source/show/img/usbhost_msc_xhci.png create mode 100644 docs/source/show/img/usbhost_rndis.png create mode 100644 docs/source/show/img/usbhost_rndis2.png create mode 100644 docs/source/show/img/usbhost_uvc.gif create mode 100644 docs/source/show/img/usbhost_wifi.png create mode 100644 docs/source/show/index.rst (limited to 'docs/source') diff --git a/docs/source/index.rst b/docs/source/index.rst index ae3730b3..c5933461 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -143,6 +143,12 @@ CherryUSB 是一个小而美的、可移植性高的、用于嵌入式系统的 version +.. toctree:: + :maxdepth: 1 + :caption: 性能展示 + + show/index + .. toctree:: :maxdepth: 1 :caption: 商业支持 diff --git a/docs/source/show/img/usbdev_msc.png b/docs/source/show/img/usbdev_msc.png new file mode 100644 index 00000000..30f22383 Binary files /dev/null and b/docs/source/show/img/usbdev_msc.png differ diff --git a/docs/source/show/img/usbdev_rndis_linux.png b/docs/source/show/img/usbdev_rndis_linux.png new file mode 100644 index 00000000..94b97312 Binary files /dev/null and b/docs/source/show/img/usbdev_rndis_linux.png differ diff --git a/docs/source/show/img/usbdev_rndis_lwip.png b/docs/source/show/img/usbdev_rndis_lwip.png new file mode 100644 index 00000000..f4cfd0b3 Binary files /dev/null and b/docs/source/show/img/usbdev_rndis_lwip.png differ diff --git a/docs/source/show/img/usbdev_rndis_lwip2.png b/docs/source/show/img/usbdev_rndis_lwip2.png new file mode 100644 index 00000000..3fde91f9 Binary files /dev/null and b/docs/source/show/img/usbdev_rndis_lwip2.png differ diff --git a/docs/source/show/img/usbdev_rndis_wifi.png b/docs/source/show/img/usbdev_rndis_wifi.png new file mode 100644 index 00000000..d6817876 Binary files /dev/null and b/docs/source/show/img/usbdev_rndis_wifi.png differ diff --git a/docs/source/show/img/usbdev_rndis_wifi2.png b/docs/source/show/img/usbdev_rndis_wifi2.png new file mode 100644 index 00000000..dba9f3dd Binary files /dev/null and b/docs/source/show/img/usbdev_rndis_wifi2.png differ diff --git a/docs/source/show/img/usbdev_rndis_win.png b/docs/source/show/img/usbdev_rndis_win.png new file mode 100644 index 00000000..4a46dd46 Binary files /dev/null and b/docs/source/show/img/usbdev_rndis_win.png differ diff --git a/docs/source/show/img/usbhost_msc.png b/docs/source/show/img/usbhost_msc.png new file mode 100644 index 00000000..ec546a8d Binary files /dev/null and b/docs/source/show/img/usbhost_msc.png differ diff --git a/docs/source/show/img/usbhost_msc_xhci.png b/docs/source/show/img/usbhost_msc_xhci.png new file mode 100644 index 00000000..084250f2 Binary files /dev/null and b/docs/source/show/img/usbhost_msc_xhci.png differ diff --git a/docs/source/show/img/usbhost_rndis.png b/docs/source/show/img/usbhost_rndis.png new file mode 100644 index 00000000..75adba38 Binary files /dev/null and b/docs/source/show/img/usbhost_rndis.png differ diff --git a/docs/source/show/img/usbhost_rndis2.png b/docs/source/show/img/usbhost_rndis2.png new file mode 100644 index 00000000..86aea3c4 Binary files /dev/null and b/docs/source/show/img/usbhost_rndis2.png differ diff --git a/docs/source/show/img/usbhost_uvc.gif b/docs/source/show/img/usbhost_uvc.gif new file mode 100644 index 00000000..c4df04e0 Binary files /dev/null and b/docs/source/show/img/usbhost_uvc.gif differ diff --git a/docs/source/show/img/usbhost_wifi.png b/docs/source/show/img/usbhost_wifi.png new file mode 100644 index 00000000..e57fd85b Binary files /dev/null and b/docs/source/show/img/usbhost_wifi.png differ diff --git a/docs/source/show/index.rst b/docs/source/show/index.rst new file mode 100644 index 00000000..f9966805 --- /dev/null +++ b/docs/source/show/index.rst @@ -0,0 +1,72 @@ +性能展示 +============================== + +以下演示了 CherryUSB 在不同应用中的性能表现。主要演示高速模式,全速看不出什么性能差异。 + +CDC 通信 +---------------- + +可以达到硬件极限性能,当然需要硬件理论支持到这速度,CherryUSB 就支持到这速度,举例如下: + +- HPM 系列(从机可以到 42MB/S, 主机 44MB/S, 已经达到硬件极限) +- BL 系列(从机 32MB/S, 主机 25MB/S, 已经达到硬件极限) +- STM32F4 全速(从机 900KB/S, 主机 1.12MB/S, 已经达到硬件极限) + +从机测速demo: cdc_acm_template.c 并且关闭 log,脚本使用 `tools/test_srcipts/test_cdc_speed.py` +主机测速demo: usb_host.c 中 TEST_USBH_CDC_SPEED=1 + + +USB Device MSC +----------------- + +演示 USB Device MSC 使用 SDXC3.0 + EMMC 测试。 + +.. figure:: img/usbdev_msc.png + +USB Device RNDIS +----------------------- + +.. note:: 默认 rndis 仅支持单包,因此下面速度为最低速度。多包支持需要联系作者。 + +演示 USB Device RNDIS 局域网下搭配 lwip 的速度。 + +作为 client + +.. figure:: img/usbdev_rndis_lwip.png + +作为 server + +.. figure:: img/usbdev_rndis_lwip2.png + +演示 USB Device RNDIS + WIFI 透传测试。 + +.. figure:: img/usbdev_rndis_wifi.png +.. figure:: img/usbdev_rndis_wifi2.png + +演示 USB Device RNDIS + 百兆以太网透传测试。 + +.. figure:: img/usbdev_rndis_win.png +.. figure:: img/usbdev_rndis_linux.png + + +USB Host MSC +----------------------- + +演示 USB Host MSC 在 USB2.0 和 USB3.0 下的速度,U盘推荐使用固态测试。 + +.. figure:: img/usbhost_msc.png +.. figure:: img/usbhost_msc_xhci.png + +USB Host UVC +----------------------- + +演示 USB Host UVC 驱动 648 * 480 YUV 摄像头。FPS 30。 + +.. figure:: img/usbhost_uvc.gif + +USB Host WIFI +----------------------- + +演示 USB Host 驱动 BL616 USB WIFI。 + +.. figure:: img/usbhost_wifi.png diff --git a/docs/source/usbdev.svg b/docs/source/usbdev.svg index d9fa9549..3ae8f8d4 100644 --- a/docs/source/usbdev.svg +++ b/docs/source/usbdev.svg @@ -1,21 +1,4 @@ -usbd_desc_registerusbd_desc_register -usbd_add_interfaceusbd_add_interface -usbd_initializeusbd_initialize -usbd_add_endpointusbd_add_endpoint -Listclass_interface_handlerclass_endpoint_handlervendor_handlernotify_handlerhid_report_descriptorhid_report_descriptor_lenintf_numusbd_intf_headappend into listappend into listin_ep_cb[8]out_ep_cb[8]in_ep_cb[8]...fill ep callbackfill ep callbackusb_dc_initusb_dc_init -USBD_IRQHandlerUSBD_IRQHandler -SETUP complete intstatusSETUP complete intstatusIN complete intstatusIN complete intstatus -OUT complete intstatusOUT complete intstatus -usbd_event_reset_handlerusbd_event_reset_handler -RESET complete intstatusRESET complete intstatususbd_event_ep0_setup_complete_handlerusbd_event_ep0_setup_complete_handler -usbd_event_ep_in_complete_handlerusbd_event_ep_in_complete_handler -usbd_event_ep_out_complete_handlerusbd_event_ep_out_complete_handler -enable ep0start reading setupenable ep0...usbd_setup_request_handlerusbd_setup_request_handler -usbd_standard_request_handlerusbd_standard_request_handler -usbd_class_request_handlerusbd_class_request_handler -usbd_vendor_request_handlerusbd_vendor_request_handler -usbd_class_interface_request_handlerusbd_class_interface_request_handler -usbd_class_endpoint_request_handlerusbd_class_endpoint_request_handler -if ep != 0x80if ep != 0x80if ep != 0x00if ep != 0x00in_ep_cb[ep & 0x7f]in_ep_cb[ep & 0x7f] -out_ep_cb[ep & 0x7f]out_ep_cb[ep & 0x7f] -NULLNULLListclass_interface_handlerclass_endpoint_handlervendor_handlernotify_handlerhid_report_descriptorhid_report_descriptor_lenintf_numViewer does not support full SVG 1.1 \ No newline at end of file + + + +usbd_desc_registerusbd_add_interfaceusbd_add_endpoint struct usbd_tx_rx_msg tx_msg[CONFIG_USBDEV_EP_NUM]; struct usbd_tx_rx_msg rx_msg[CONFIG_USBDEV_EP_NUM];struct usbd_interface *intf[16];usbd_initializeUSBD_IRQHandlerusbd_event_reset_handlerusbd_event_ep0_setup_complete_handlerusbd_event_ep_in_complete_handlerusbd_event_ep_out_complete_handlerusbd_setup_request_handlertx_msg[ep & 0x7f].cbrx_msg[ep & 0x7f].cbusbd_event_ep0_in_complete_handlertx_msg[ep & 0x7f].cbusbd_event_ep0_out_complete_handlerrx_msg[ep & 0x7f].cbusbd_standard_request_handlerusbd_class_request_handlerusbd_vendor_request_handler \ No newline at end of file -- cgit v1.3.1