Files
tinyusb/examples
hathach 9d51270f7b Retry CH569 SuperSpeed training and fix net_lwip_webserver EP0 size
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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MRGjBT2NBkCoWwyDT4LaE
2026-07-08 07:32:49 +07:00
..