<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/examples/device/net_lwip_webserver, branch worktree-ch569-hydrausb3</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/tinyusb.git/atom/examples/device/net_lwip_webserver?h=worktree-ch569-hydrausb3</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/examples/device/net_lwip_webserver?h=worktree-ch569-hydrausb3'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-07-11T22:02:59Z</updated>
<entry>
<title>ch32h417: register in CI matrix, lwIP throughput, docs and presets</title>
<updated>2026-07-11T22:02:59Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-11T22:02:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=741776311b8f6e0c3fdbf4e00a9c3aff7cd577b2'/>
<id>urn:sha1:741776311b8f6e0c3fdbf4e00a9c3aff7cd577b2</id>
<content type='text'>
Final integration for the CH32H417 port.

- .github/workflows/ci_set_matrix.py: add ch32h417 (riscv-gcc) so CI builds it.
- examples/device/net_lwip_webserver: enable LWIP_HIGH_THROUGHPUT for the H417
  (SuperSpeed iperf).
- docs/reference/{boards,dependencies}.rst + hw/bsp/BoardPresets.json: regenerated
  for the new board and dependency.

usbtest quirks intentionally left at 0 for the H417: its endpoint engine fixes the
two CH569 5 Gbps silicon limitations (RB_EP_TX/RX_HALT gives a repeatable STALL for
case 13; the reworked EP0/chain path is expected free of the wLength%4==1 ctrl_out
drop), so the H417 targets a full 30/30 at SuperSpeed rather than 27/27.

The HIL entry (test/hil/tinyusb.json) is deliberately deferred: it needs the chip's
ESIG unique id read from the board on first flash, which is pending hardware access.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01QWhrtHjbSVMKcY68vxBwBm
</content>
</entry>
<entry>
<title>Reach SuperSpeed-class iperf on CH569 net_lwip_webserver</title>
<updated>2026-07-08T01:49:16Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-08T01:49:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=c54e81e9fbd2019d174dd1dd124021ec6d3ee713'/>
<id>urn:sha1:c54e81e9fbd2019d174dd1dd124021ec6d3ee713</id>
<content type='text'>
Measurements with the 9*MSS window showed iperf pinned at 51 Mbit/s with
the in-flight data exactly tracking the advertised window: the 120 MHz
core's TCP receive path is the bottleneck, not the window or the USB
link. Recover the software-checksum cost: inbound IP/UDP/TCP checksum
VERIFICATION is skipped on the SuperSpeed build (USB already CRC32
protects every payload; outbound generation stays on). iperf over
SuperSpeed improves 51 -&gt; 74.5 Mbit/s (device RX, lwiperf).

Also from bringing this up on a marginal SS lane that takes seconds to
train (normal lanes train in &lt;100 ms):
- CFG_TUD_WCH_USB30_FALLBACK is now overridable from the build line;
  =0 builds SuperSpeed-only, which retries training indefinitely
  instead of settling for high speed
- the fallback keeps retrying twice as long (4.4 s) when far-end RX
  terminations were seen: terminations mean an SS-capable partner
  exists, while a USB2-only host (no terminations) still falls back
  after ~2 s

Validated on HydraUSB3 behind a Renesas uPD720201 hub; 65/65 unit
tests, full example sweep, pre-commit clean.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_019MRGjBT2NBkCoWwyDT4LaE
</content>
</entry>
<entry>
<title>Tune net_lwip_webserver lwIP memory for SuperSpeed on CH569</title>
<updated>2026-07-08T00:55:13Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-08T00:55:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=38538443117dbf2a94c5c83582fcc1303eac4fcd'/>
<id>urn:sha1:38538443117dbf2a94c5c83582fcc1303eac4fcd</id>
<content type='text'>
iperf on the SuperSpeed build is TCP-window-bound (51 Mbit/s with the
6*MSS window). Reclaim RAMX to widen it:

- dcd_ch56x_usbhs: new CFG_TUD_WCH_USBHS_EP_MAX limits usable endpoint
  numbers and scales the static RAMX bounce buffers accordingly
  (default unchanged at 8 endpoints)
- net_lwip_webserver: limit the (fallback) USB2 endpoints to 1-3,
  freeing 4 KB of RAMX; grow the SuperSpeed build to PBUF_POOL_SIZE 9 /
  TCP_WND 9*MSS (the high-speed build keeps 6/6). RAMX 94% of 32 KB.

High-speed fallback verified unchanged on HydraUSB3 (33 Mbit/s, full
enumeration); the SuperSpeed window measurement is pending the rig's SS
lane, which trains only intermittently (analog-marginal path - same
binaries trained and ran 51 Mbit/s earlier the same day).

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_019MRGjBT2NBkCoWwyDT4LaE
</content>
</entry>
<entry>
<title>Retry CH569 SuperSpeed training and fix net_lwip_webserver EP0 size</title>
<updated>2026-07-08T00:32:49Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-08T00:32:49Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=9d51270f7bb1d70978e2b4abb672d0fe930fb68d'/>
<id>urn:sha1:9d51270f7bb1d70978e2b4abb672d0fe930fb68d</id>
<content type='text'>
Two fixes found bringing up SuperSpeed on a Renesas uPD720201-based hub:

- dcd_ch56x_usb30: retry link training with a fresh detect cycle every
  second fallback-timer tick (4 ticks total) before switching to the
  USB2 fallback. Some hubs only complete Polling on a re-attempt; with
  a single continuous attempt the link reached U0 rarely and the port
  fell back to high speed almost every boot.

- net_lwip_webserver: CFG_TUD_ENDPOINT0_SIZE was left at plain 64, so
  usbd chunked EP0 data at 64 bytes; on a 512-mps SuperSpeed control
  endpoint the first chunk is a short packet, the host ends the data
  stage early and the status stage deadlocks until timeout ("can't
  read configurations, error -110"). Use the SuperSpeed-aware size and
  clamp the device-qualifier bMaxPacketSize0 like the other examples.

Validated on HydraUSB3: NCM enumerates at 5000M reliably across warm
reboots; lwiperf over SuperSpeed measures 51 Mbit/s device RX (TCP
window bound; 33 Mbit/s on the high-speed fallback), MSC 169/136 MB/s.
Full example sweep, 65/65 unit tests, pre-commit clean.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_019MRGjBT2NBkCoWwyDT4LaE
</content>
</entry>
<entry>
<title>Add SuperSpeed support to CDC-NCM and enable iperf on CH569</title>
<updated>2026-07-07T06:03:25Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-07T06:03:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=149b91c0667eca43d5d5a11aae2d6e1d0c25c17d'/>
<id>urn:sha1:149b91c0667eca43d5d5a11aae2d6e1d0c25c17d</id>
<content type='text'>
- TUD_CDC_NCM_SS_DESCRIPTOR template (bulk 1024 + endpoint companions)
  and companion handling in netd_open (notification endpoint skip,
  bulk pair drv_len)
- net_lwip_webserver: SS device/config/BOS descriptors for the NCM
  build, CH569 added to the LWIP_HIGH_THROUGHPUT tier (builds lwiperf).
  The 16 KB RAMS cannot hold lwIP: heap and pools go to the 32 KB RAMX
  via LWIP_DECLARE_MEMORY_ALIGNED (arch/cc.h), with a 6-pbuf pool /
  6*MSS window and a 3 KB dcd bounce pool to fit (RAMX 92%)
- CH569 dcd fixes found while bringing this up: TMR0 counts only 26
  bits, so the previous 1 s fallback CNT_END (120e6 &gt; 2^26) silently
  never expired - use 0.55 s per phase; make link busy-waits in
  usb30_hw_init best-effort so a stuck-BUSY teardown state cannot
  abort re-initialization half way

Builds clean (full ch56x example sweep); NOT yet hardware-validated:
the rig's WCH-LinkE stopped completing flash writes mid-session (reads
and erases fine), leaving the board without firmware - iperf numbers
pending physical probe/board recovery.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Add CH569 USB3.0 SuperSpeed device driver - TinyUSB's first SuperSpeed port</title>
<updated>2026-07-07T04:11:41Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-07T04:11:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=36756e4c432fe6c2ed10466d739663ef83e3f27d'/>
<id>urn:sha1:36756e4c432fe6c2ed10466d739663ef83e3f27d</id>
<content type='text'>
New dcd_ch56x_usb30.c + ch56x_usb30_reg.h (both MIT, written fresh):
- Register model from the hydrausb3 project's reverse engineering
  (wch-ch56x-lib, Apache-2.0) and TeenyUSB's CH56x port (MIT), with
  LINK-layer bit names per the officially documented CH32H417 (same IP,
  CH32H417RM chapter 27); TU_VERIFY_STATIC offset asserts guard the
  vendor header layout
- Software-assisted LTSSM in the LINK interrupt: polling/TXEQ/ready
  sequencing, LMP PORT_CAPABILITY + PORT_CONFIGURATION exchange, warm
  and hot reset handling. Link-up (ready after TXEQ) is reported as
  dcd_event_bus_reset with TUSB_SPEED_SUPER
- EP0 with fixed 512-byte mps: SETUP via RX flag bit30, unified status
  stage via bit29 (SET_ADDRESS applied there), manual IN packet sequence
- Data endpoints with per-burst DMA re-arm, partial burst-drain
  accounting, ERDY flow control and NUMP=1 default (multi-packet burst
  silicon quirk); RAMX bounce slots from a small pool for transfer
  buffers outside RAMX; isochronous not supported
- Board vector forwarders unified into one handler + symbol aliases:
  gcc identical-code-folding otherwise rewrites one interrupt handler
  as a call into another whose mret skips the caller's epilogue,
  leaking a stack frame per interrupt (found the hard way)
- hydrausb3_v1 default SPEED flipped to super; skip net_lwip_webserver
  (16 KB RAMS, same as other small-RAM parts)

Verified on HydraUSB3 v1 hardware (ci rig, USB3 host port):
- cdc_msc enumerates at 5000M: bcdUSB 3.20, EP0 mps 2^9, endpoint
  companion descriptors, BOS with USB2-ext + SuperSpeed capability
- CDC echo and MSC FAT12 reads functional at SuperSpeed; 30x sustained
  read stress and 5x replug/reset cycles all re-enumerate at 5000M
- SPEED=high regression: still enumerates at 480M
- Full example sweep builds for both controllers

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>docs: add build-doc tooling and a README for every example</title>
<updated>2026-06-29T03:16:25Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-29T03:16:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=4b1c8d16f72bb5d8f2eb8a2e8dde35abdd2f2a88'/>
<id>urn:sha1:4b1c8d16f72bb5d8f2eb8a2e8dde35abdd2f2a88</id>
<content type='text'>
Documentation tooling:
- Add the `build-doc` skill and `tools/build_doc.py` wrapper for local
  Sphinx builds (clean / -W / open).
- Enable Markdown (MyST) in conf.py and auto-collect
  examples/{device,host,dual}/*/README.md into a 3-level Examples nav
  (Examples &gt; Device/Host/Dual &gt; example), noting each page's source
  location and normalizing headings to a single H1.
- Remove the stale `.claude/commands/build-doc.md`; point the AGENTS.md
  Documentation section at the skill.

Example docs:
- Add a README.md for every device/host/dual example: what it does, USB
  interface table, notable tusb_config.h settings, generic CMake + Make
  build steps, and how to try it.
- Fold each *_freertos variant into its base README, noting the FreeRTOS
  source path and any RTOS-specific behavior.

Generated docs/examples/ output is git-ignored. Builds clean with
`sphinx-build -W`.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'tinyusb/master' into stm32c5</title>
<updated>2026-05-24T16:46:26Z</updated>
<author>
<name>HiFiPhile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-05-24T16:46:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=d4aa0dd653612707733edf3c3417aecc06074962'/>
<id>urn:sha1:d4aa0dd653612707733edf3c3417aecc06074962</id>
<content type='text'>
Signed-off-by: HiFiPhile &lt;admin@hifiphile.com&gt;
</content>
</entry>
<entry>
<title>tweak examples</title>
<updated>2026-05-23T17:37:47Z</updated>
<author>
<name>HiFiPhile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-05-23T17:22:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=1fc308fb87935e6260349d5721ee81c046b68461'/>
<id>urn:sha1:1fc308fb87935e6260349d5721ee81c046b68461</id>
<content type='text'>
Signed-off-by: HiFiPhile &lt;admin@hifiphile.com&gt;
</content>
</entry>
<entry>
<title>enable iperf</title>
<updated>2026-05-14T12:09:06Z</updated>
<author>
<name>HiFiPhile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-05-14T12:09:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=24440cfc2ea5a0258ebbae6f3de090d9a0064e48'/>
<id>urn:sha1:24440cfc2ea5a0258ebbae6f3de090d9a0064e48</id>
<content type='text'>
Signed-off-by: HiFiPhile &lt;admin@hifiphile.com&gt;
</content>
</entry>
</feed>
