From 9c316a458cdfcc00f1d349e24f3504337a59daa1 Mon Sep 17 00:00:00 2001 From: HiFiPhile Date: Mon, 1 Jun 2026 22:37:14 +0200 Subject: add device errata document Signed-off-by: HiFiPhile --- docs/index.rst | 1 + docs/troubleshooting.rst | 2 ++ 2 files changed, 3 insertions(+) (limited to 'docs') diff --git a/docs/index.rst b/docs/index.rst index 39d30a038..a8762c2c2 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,6 +10,7 @@ reference/index faq troubleshooting + reference/errata .. toctree:: :maxdepth: 1 diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index bb9f15166..531d471ed 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -76,6 +76,8 @@ Invalid board name in build command. Runtime Issues ============== +Check :doc:`reference/errata` for known hardware-specific issues that may affect USB functionality on your device. + Device Mode Problems -------------------- -- cgit v1.3.1 From 72006885c7a2fd20d123536d25db9fe1f154d9b3 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 2 Jun 2026 15:24:31 +0700 Subject: add sponsor section --- README.rst | 70 +++++++++++++++++++++++++++++++++++-------- docs/assets/adafruit_logo.svg | 6 ++-- docs/assets/stack.svg | 2 +- 3 files changed, 62 insertions(+), 16 deletions(-) (limited to 'docs') diff --git a/README.rst b/README.rst index 04998abaa..ea33a2a53 100644 --- a/README.rst +++ b/README.rst @@ -1,12 +1,32 @@ TinyUSB ======= -|Build Status| |CircleCI Status| |Documentation Status| |Static Analysis| |Fuzzing Status| |Membrowse| |License| +|Sponsor| |Build Status| |CircleCI Status| |Documentation Status| |Static Analysis| |Fuzzing Status| |Membrowse| |License| + +Overview +-------- + +.. figure:: docs/assets/logo.svg + :alt: TinyUSB + :align: left + +.. raw:: html + +
+ +TinyUSB is an open-source cross-platform USB Host/Device stack for embedded systems. It’s designed for memory safety +(no dynamic allocation) and thread safety (all interrupts deferred to non-ISR task functions). The stack emphasizes portability, +small footprint, and real-time performance across 50+ MCU families. Sponsors -------- -TinyUSB is funded by: Adafruit. Purchasing products from them helps to support this project. +TinyUSB's continued development is made possible by its sponsors. If TinyUSB helps your products or projects, consider funding its development on `GitHub Sponsors`_. + +Platinum +^^^^^^^^ + +`Adafruit`_ has backed TinyUSB since day one as its founding and sole Platinum sponsor. Buying their products directly funds the project's development. .. figure:: docs/assets/adafruit_logo.svg :alt: Adafruit Logo @@ -17,20 +37,44 @@ TinyUSB is funded by: Adafruit. Purchasing products from them helps to support t
-Overview --------- +Sponsors (QWORD) +^^^^^^^^^^^^^^^^ -.. figure:: docs/assets/logo.svg - :alt: TinyUSB - :align: left +.. QWORD-SPONSORS-START -.. raw:: html +*No QWORD sponsors yet — be the first!* -
+.. QWORD-SPONSORS-END -TinyUSB is an open-source cross-platform USB Host/Device stack for embedded systems. It’s designed for memory safety -(no dynamic allocation) and thread safety (all interrupts deferred to non-ISR task functions). The stack emphasizes portability, -small footprint, and real-time performance across 50+ MCU families. +Backers (DWORD) +^^^^^^^^^^^^^^^ + +.. DWORD-BACKERS-START + +*No backers yet — be the first!* + +.. DWORD-BACKERS-END + +Supporters (Word) +^^^^^^^^^^^^^^^^^ + +.. WORD-SUPPORTERS-START + +*No supporters yet — be the first!* + +.. WORD-SUPPORTERS-END + +Thanks (Byte) +^^^^^^^^^^^^^ + +.. BYTE-THANKS-START + +*No names listed yet — be the first!* + +.. BYTE-THANKS-END + +.. _GitHub Sponsors: https://github.com/sponsors/hathach +.. _Adafruit: https://www.adafruit.com Key Features ------------ @@ -303,6 +347,8 @@ The following tools are provided freely to support the development of the TinyUS :target: https://membrowse.com/public/hathach/tinyusb .. |License| image:: https://img.shields.io/badge/license-MIT-brightgreen.svg :target: https://opensource.org/licenses/MIT +.. |Sponsor| image:: https://img.shields.io/badge/sponsor-%E2%9D%A4-ec6cb9.svg + :target: https://github.com/sponsors/hathach .. _Changelog: docs/info/changelog.rst diff --git a/docs/assets/adafruit_logo.svg b/docs/assets/adafruit_logo.svg index cafd5a10e..e978f2c6e 100644 --- a/docs/assets/adafruit_logo.svg +++ b/docs/assets/adafruit_logo.svg @@ -1,8 +1,8 @@ - + - + diff --git a/docs/assets/stack.svg b/docs/assets/stack.svg index ed46c8649..113c92b60 100644 --- a/docs/assets/stack.svg +++ b/docs/assets/stack.svg @@ -1 +1 @@ - + -- cgit v1.3.1 From e35b070dae92fd2750b8116a6ca0f1de393c7a6a Mon Sep 17 00:00:00 2001 From: HiFiPhile Date: Tue, 2 Jun 2026 10:41:27 +0200 Subject: rename to device issues Signed-off-by: HiFiPhile --- README.rst | 8 ++++---- docs/index.rst | 2 +- docs/reference/device_issues.rst | 39 +++++++++++++++++++++++++++++++++++++++ docs/reference/index.rst | 1 + docs/troubleshooting.rst | 2 +- 5 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 docs/reference/device_issues.rst (limited to 'docs') diff --git a/README.rst b/README.rst index c376599ec..e039c2b61 100644 --- a/README.rst +++ b/README.rst @@ -207,7 +207,7 @@ Supported CPUs | | +-------------------+--------+------+-----------+------------------------+---------------------------------------------+ | | | 51u | ✔ | ✖ | ✖ | lpc_ip3511 | | | | +-------------------+--------+------+-----------+------------------------+---------------------------------------------+ -| | | 54 | ⚠ | ⚠ | ✔ | lpc_ip3511, lpc_ip3516 | :ref:`NRND, read errata ` | +| | | 54 | ⚠ | ⚠ | ✔ | lpc_ip3511, lpc_ip3516 | :ref:`NRND, read errata ` | | | +-------------------+--------+------+-----------+------------------------+---------------------------------------------+ | | | 55 | ✔ | ✔ | ✔ | lpc_ip3511, lpc_ip3516 | | | +---------+-------------------+--------+------+-----------+------------------------+---------------------------------------------+ @@ -261,11 +261,11 @@ Supported CPUs +--------------+-----------------------------+--------+------+-----------+------------------------+---------------------------------------------+ | ValentyUSB | eptri | ✔ | ✖ | ✖ | eptri | | +--------------+-----------------------------+--------+------+-----------+------------------------+---------------------------------------------+ -| WCH | CH32F20x | ⚠ | | ✔ | ch32_usbhs | :ref:`ISO data loss ` | +| WCH | CH32F20x | ⚠ | | ✔ | ch32_usbhs | :ref:`ISO data loss ` | | +-----------------------------+--------+------+-----------+------------------------+---------------------------------------------+ -| | CH32V20x | ⚠ | | ✖ | stm32_fsdev/ch32_usbfs | :ref:`ISO data loss ` | +| | CH32V20x | ⚠ | | ✖ | stm32_fsdev/ch32_usbfs | :ref:`ISO data loss ` | | +-----------------------------+--------+------+-----------+------------------------+---------------------------------------------+ -| | CH32V305, CH32V307 | ⚠ | | ✔ | ch32_usbfs/hs | :ref:`ISO data loss ` | +| | CH32V305, CH32V307 | ⚠ | | ✔ | ch32_usbfs/hs | :ref:`ISO data loss ` | +--------------+-----------------------------+--------+------+-----------+------------------------+---------------------------------------------+ Table Legend diff --git a/docs/index.rst b/docs/index.rst index a8762c2c2..b80804ad4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,7 +10,7 @@ reference/index faq troubleshooting - reference/errata + reference/device_issues .. toctree:: :maxdepth: 1 diff --git a/docs/reference/device_issues.rst b/docs/reference/device_issues.rst new file mode 100644 index 000000000..22677f967 --- /dev/null +++ b/docs/reference/device_issues.rst @@ -0,0 +1,39 @@ +Device specific known issues and workarounds +=============================================== +This page lists known issues and workarounds for specific devices. + +.. _LPC54600 Issues: + +NXP LPC54600 +---------------- +**Severity: High** + +**Not recommended for USB device applications (except high-speed host controller)** + +Reference: `LPC54600 Errata Sheet`_ + +.. _LPC54600 Errata Sheet: https://www.nxp.com/docs/en/errata/ES_LPC546XX.pdf + +The LPC54600 series have a very buggy USB controller, with totally 17 issues listed in the errata which is more than half of the total issues. + +Most severe issues are: + +- USB.2: In USB high-speed device mode, the NBytes field is not correct after BULK IN transfer +- USB.5: In USB full-speed host mode, linked list on done queue is broken. +- USB.15: USB high-speed device in endpoint TX data corruption + +.. _WCH CH32X Issues: + +WCH CH32V10X/CH32V20X/CH32V30X +--------------------------------- +**Severity: Medium** + +**Not recommended for USB audio applications** + +Reference: `CH32V30X Reference Manual`_ USBFS/USBHS controller chapter + +.. _CH32V30X Reference Manual: https://www.wch-ic.com/downloads/CH32FV2x_V3xRM_PDF.html + +Data corruption may occur on isochronous endpoints. Due to the lacking of FIFO for interrupt status registers, later completed transfer will overwrite `INT_ST` and `RX_LEN` register if previous transfer processing is not completed. + +Other types of transfers are not affected. diff --git a/docs/reference/index.rst b/docs/reference/index.rst index d3c96eeee..fe504627d 100644 --- a/docs/reference/index.rst +++ b/docs/reference/index.rst @@ -12,4 +12,5 @@ Complete reference documentation for TinyUSB APIs, configuration, and supported boards dependencies concurrency + device_issues glossary diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 531d471ed..613c7fcef 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -76,7 +76,7 @@ Invalid board name in build command. Runtime Issues ============== -Check :doc:`reference/errata` for known hardware-specific issues that may affect USB functionality on your device. +Check :doc:`reference/device_issues` for known hardware-specific issues that may affect USB functionality on your device. Device Mode Problems -------------------- -- cgit v1.3.1 From 22c2ece872262c1331482f8e80881ab1f5f36c0b Mon Sep 17 00:00:00 2001 From: HiFiPhile Date: Tue, 2 Jun 2026 11:10:15 +0200 Subject: try to get render right Signed-off-by: HiFiPhile --- README.rst | 8 ++++---- docs/conf.py | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/README.rst b/README.rst index fac098c1c..ecfbeb7cc 100644 --- a/README.rst +++ b/README.rst @@ -251,7 +251,7 @@ Supported CPUs | | +-------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ | | | 51u | ✔ | ✖ | ✖ | lpc_ip3511 | | | | +-------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ -| | | 54 | ⚠ | ⚠ | ✔ | lpc_ip3511, lpc_ip3516 | `NRND, read errata `_ | +| | | 54 | ⚠ | ⚠ | ✔ | lpc_ip3511, lpc_ip3516 | `NRND, read errata `_ | | | +-------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ | | | 55 | ✔ | ✔ | ✔ | lpc_ip3511, lpc_ip3516 | | | +---------+-------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ @@ -305,11 +305,11 @@ Supported CPUs +--------------+-----------------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ | ValentyUSB | eptri | ✔ | ✖ | ✖ | eptri | | +--------------+-----------------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ -| WCH | CH32F20x | ⚠ | | ✔ | ch32_usbhs | `ISO data loss `_ | +| WCH | CH32F20x | ⚠ | | ✔ | ch32_usbhs | `ISO data loss `_ | | +-----------------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ -| | CH32V20x | ⚠ | | ✖ | stm32_fsdev/ch32_usbfs | `ISO data loss `_ | +| | CH32V20x | ⚠ | | ✖ | stm32_fsdev/ch32_usbfs | `ISO data loss `_ | | +-----------------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ -| | CH32V305, CH32V307 | ⚠ | | ✔ | ch32_usbfs/hs | `ISO data loss `_ | +| | CH32V305, CH32V307 | ⚠ | | ✔ | ch32_usbfs/hs | `ISO data loss `_ | +--------------+-----------------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ Table Legend diff --git a/docs/conf.py b/docs/conf.py index 9e9784fb7..86ddcf672 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -53,6 +53,25 @@ def preprocess_readme(): tgt = Path(__file__).parent.parent / "README_processed.rst" if src.exists(): content = src.read_text(encoding='utf-8') + # if the matching is inside a table, keep the table cell width by adding the same number of spaces in the end of the line + # match pattern: | ... `... `_ ... | + # change into: | ... `... <...>`_ ... | + def _rewrite_table_line(line): + if not (line.startswith('|') and line.rstrip().endswith('|')): + return line + + rewritten = re.sub(r"]+)>", r"<\1>", line) + delta = len(line) - len(rewritten) - 1 # -1 for rst->html + + if delta > 0: + last_pipe = rewritten.rfind('|') + if last_pipe >= 0: + rewritten = rewritten[:last_pipe] + (' ' * delta) + rewritten[last_pipe:] + + return rewritten + + content = ''.join(_rewrite_table_line(line) for line in content.splitlines(keepends=True)) + content = re.sub(r"docs/", r"", content) content = re.sub(r"\.rst\b", r".html", content) if not content.endswith("\n"): -- cgit v1.3.1 From ff3fef931dd2be604fd525814654d1cfcd7c725c Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2026 16:01:23 +0000 Subject: docs: fix review issues in device_issues and README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove duplicate toctree entry for reference/device_issues from docs/index.rst (already included via docs/reference/index.rst) - Fix WCH section title: CH32V10X/CH32V20X/CH32V30X → CH32F20x/CH32V20x/CH32V30x to match the three actual README table entries (CH32F20x, CH32V20x, CH32V305/307) - Update README anchor links to match the renamed section - Qualify USBFS non-ISO transfer safety claim: USBHS is protected by USBHS_INT_BUSY_EN but USBFS behavior is not yet confirmed - Fix LPC54600 note: "read errata" → "see device issues" - Remove "totally" from LPC54600 description Co-authored-by: Ha Thach --- README.rst | 8 ++++---- docs/index.rst | 1 - docs/reference/device_issues.rst | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) (limited to 'docs') diff --git a/README.rst b/README.rst index ecfbeb7cc..67149a4f2 100644 --- a/README.rst +++ b/README.rst @@ -251,7 +251,7 @@ Supported CPUs | | +-------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ | | | 51u | ✔ | ✖ | ✖ | lpc_ip3511 | | | | +-------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ -| | | 54 | ⚠ | ⚠ | ✔ | lpc_ip3511, lpc_ip3516 | `NRND, read errata `_ | +| | | 54 | ⚠ | ⚠ | ✔ | lpc_ip3511, lpc_ip3516 | `NRND, see device issues `_ | | | +-------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ | | | 55 | ✔ | ✔ | ✔ | lpc_ip3511, lpc_ip3516 | | | +---------+-------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ @@ -305,11 +305,11 @@ Supported CPUs +--------------+-----------------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ | ValentyUSB | eptri | ✔ | ✖ | ✖ | eptri | | +--------------+-----------------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ -| WCH | CH32F20x | ⚠ | | ✔ | ch32_usbhs | `ISO data loss `_ | +| WCH | CH32F20x | ⚠ | | ✔ | ch32_usbhs | `ISO data loss `_ | | +-----------------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ -| | CH32V20x | ⚠ | | ✖ | stm32_fsdev/ch32_usbfs | `ISO data loss `_ | +| | CH32V20x | ⚠ | | ✖ | stm32_fsdev/ch32_usbfs | `ISO data loss `_ | | +-----------------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ -| | CH32V305, CH32V307 | ⚠ | | ✔ | ch32_usbfs/hs | `ISO data loss `_ | +| | CH32V305, CH32V307 | ⚠ | | ✔ | ch32_usbfs/hs | `ISO data loss `_ | +--------------+-----------------------------+--------+------+-----------+------------------------+-----------------------------------------------------------------------------------------+ Table Legend diff --git a/docs/index.rst b/docs/index.rst index b80804ad4..39d30a038 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,7 +10,6 @@ reference/index faq troubleshooting - reference/device_issues .. toctree:: :maxdepth: 1 diff --git a/docs/reference/device_issues.rst b/docs/reference/device_issues.rst index a69f6ba80..6dafe4de2 100644 --- a/docs/reference/device_issues.rst +++ b/docs/reference/device_issues.rst @@ -12,7 +12,7 @@ Reference: `LPC54600 Errata Sheet`_ .. _LPC54600 Errata Sheet: https://www.nxp.com/docs/en/errata/ES_LPC546XX.pdf -The LPC54600 series have a very buggy USB controller, with totally 17 issues listed in the errata which is more than half of the total issues. +The LPC54600 series have a very buggy USB controller, with 17 issues listed in the errata which is more than half of the total issues. Most severe issues are: @@ -20,7 +20,7 @@ Most severe issues are: - USB.5: In USB full-speed host mode, linked list on done queue is broken. - USB.15: USB high-speed device in endpoint TX data corruption -WCH CH32V10X/CH32V20X/CH32V30X +WCH CH32F20x/CH32V20x/CH32V30x --------------------------------- **Severity: Medium** @@ -32,4 +32,4 @@ Reference: `CH32V30X Reference Manual`_ USBFS/USBHS controller chapter Data corruption may occur on isochronous endpoints. Due to the lacking of FIFO for interrupt status registers, later completed transfer will overwrite `INT_ST` and `RX_LEN` register if previous transfer processing is not completed. -Other types of transfers are not affected. +For USBHS devices (CH32F20x, CH32V305/CH32V307), other transfer types are protected by the ``USBHS_INT_BUSY_EN`` mechanism which holds off new transfers while an interrupt is being processed. USBFS device behavior is not fully confirmed. -- cgit v1.3.1 From f19c01216fc5fc0f07789932df1db6fde82f525b Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2026 16:59:14 +0000 Subject: docs: revert USBFS non-ISO transfer qualification in device_issues Restore original "Other types of transfers are not affected" statement, removing the conditional USBHS_INT_BUSY_EN / USBFS-unconfirmed wording. Co-authored-by: Zixun LI --- docs/reference/device_issues.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/reference/device_issues.rst b/docs/reference/device_issues.rst index 6dafe4de2..ae9cd55f1 100644 --- a/docs/reference/device_issues.rst +++ b/docs/reference/device_issues.rst @@ -32,4 +32,4 @@ Reference: `CH32V30X Reference Manual`_ USBFS/USBHS controller chapter Data corruption may occur on isochronous endpoints. Due to the lacking of FIFO for interrupt status registers, later completed transfer will overwrite `INT_ST` and `RX_LEN` register if previous transfer processing is not completed. -For USBHS devices (CH32F20x, CH32V305/CH32V307), other transfer types are protected by the ``USBHS_INT_BUSY_EN`` mechanism which holds off new transfers while an interrupt is being processed. USBFS device behavior is not fully confirmed. +Other types of transfers are not affected. -- cgit v1.3.1