summaryrefslogtreecommitdiff
path: root/examples/device/net_lwip_webserver/src
AgeCommit message (Collapse)Author
2026-07-12ch32h417: register in CI matrix, lwIP throughput, docs and presetshathach
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) <[email protected]> Claude-Session: https://claude.ai/code/session_01QWhrtHjbSVMKcY68vxBwBm
2026-07-08Reach SuperSpeed-class iperf on CH569 net_lwip_webserverhathach
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 -> 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 <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 <[email protected]> Claude-Session: https://claude.ai/code/session_019MRGjBT2NBkCoWwyDT4LaE
2026-07-08Tune net_lwip_webserver lwIP memory for SuperSpeed on CH569hathach
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 <[email protected]> Claude-Session: https://claude.ai/code/session_019MRGjBT2NBkCoWwyDT4LaE
2026-07-08Retry CH569 SuperSpeed training and fix net_lwip_webserver EP0 sizehathach
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 <[email protected]> Claude-Session: https://claude.ai/code/session_019MRGjBT2NBkCoWwyDT4LaE
2026-07-07Add SuperSpeed support to CDC-NCM and enable iperf on CH569hathach
- 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 > 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 <[email protected]>
2026-05-24Merge remote-tracking branch 'tinyusb/master' into stm32c5HiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-23tweak examplesHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-14enable iperfHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-08reduce NTM sizeHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-08fix iperf server is always excludedHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-08Merge remote-tracking branch 'tinyusb/master' into ncm_packet_filterHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-05-04minor clean uphathach
2026-05-03Merge branch 'master' into copilot/upgrade-net-lwip-webserver-descriptorsZixun LI
2026-05-01Merge remote-tracking branch 'origin/master' into ncm_packet_filterHiFiPHile
2026-05-01ncm: implement GetNtbInputSize requestZixun LI
Signed-off-by: HiFiPHile <[email protected]>
2026-04-30refactor capabilityZixun LI
Signed-off-by: Zixun LI <[email protected]>
2026-04-26gate lwIP throughput tuning + iperf on MCU SRAM tierhathach
The bigger TCP_WND/PBUF_POOL/MEMP_NUM_TCP_SEG and the always-on iperf overflowed SRAM on stm32c0/f1/wb, lpc11/13, samd11. Add LWIP_HIGH_THROUGHPUT gate (defined in tusb_config.h, consumed by lwipopts.h) so RAM-tight MCUs keep the original modest buffers and skip iperf, while RAM-rich targets (max32*/stm32f2/f4/f7/h5/h7/h7rs/u5/n6, rp2040, mimxrt1xxx, nrf5x) keep the throughput tuning needed for the iperf HIL test. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-04-23reduce memory, focus on keep iperf speedhathach
2026-04-23tweak lwip config to get better iperf throughputhathach
2026-04-22musb implement double buffer for txhathach
2026-04-21replace `TUD_ENDPOINT_ONE_DIRECTION_ONLY` with ↵hathach
`CFG_TUD_ENDPOINT_ONE_DIRECTION_ONLY` for improved configuration consistency across examples and core sources
2026-04-20add test for net_lwip_webserver with iperf throughput validationhathach
2026-03-22examples/net_lwip_webserver: fix other_speed_config to use ↵copilot-swe-agent[bot]
TUSB_DESC_OTHER_SPEED_CONFIG and fix SEED typo Co-authored-by: HiFiPhile <[email protected]> Agent-Logs-Url: https://github.com/hathach/tinyusb/sessions/3d21b8d3-b2df-4603-a426-2bcfdb408f04
2026-03-22net: upgrade net_lwip_webserver to separate FS/HS descriptors and add ↵copilot-swe-agent[bot]
bInterval to TUD_CDC_NCM_DESCRIPTOR Co-authored-by: HiFiPhile <[email protected]> Agent-Logs-Url: https://github.com/hathach/tinyusb/sessions/e212b526-e279-4a83-88bf-a742df293165
2026-03-12fix exampleZixun LI
Signed-off-by: Zixun LI <[email protected]>
2026-03-12Merge branch 'master' into ncm_restartZixun LI
2026-03-05add IAR warning flags to cmake build and fix themhathach
2026-02-28replace board_millis() with tusb_time_millis_api()hathach
2025-12-28example/net: add led blink taskHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-11-12migrate cdc device to use edpt stream APIhathach
tu_edpt_stream_open() does not clear fifo, allow for persistent stream when disconnect/reconnect
2025-11-08fix more alertshathach
2025-11-07fix more alerts found by pvs-studiohathach
2025-11-04Fixed more alert found by PVS-Studiohathach
2025-10-28fix Identifiers that start with '__' or '_[A-Z]' are reserved.hathach
fix compiling with nuc family
2025-10-28fix descriptor warning when shifting zerohathach
2025-10-24fix several warningshathach
2025-10-15merge samd2x and saml2x bsp, add OPT_MCU_SAML2X to replace OPT_MCU_SAML21 & ↵hathach
OPT_MCU_SAML22
2025-10-14improve cmake warning flags, fix various warnings in exampleshathach
2025-09-17Fix board_init_after_tusbHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-05-29examples/device/net_lwip_webserver: Simplify example code.Andrew Leech
Now that tud_network_recv_renew has protections against recursion it's safe and simpler to handle the lwip frame entirely in the same callback.
2025-05-29Add USB NCM link state control supportAndrew Leech
This adds the ability to dynamically control the network link state for NCM devices. The host OS will see the network interface as connected/disconnected based on the link state. New API: - tud_network_link_state(rhport, is_up): Set link up/down state Example updates: - Added button control to toggle link state - Fixed LWIP integration to properly handle link state changes - Added printf to show correct protocol (NCM vs RNDIS/ECM) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
2024-11-28Merge branch 'master' into fork/HiFiPhile/lwip_fixhathach
2024-10-15Add comment to BOS descriptor.HiFiPhile
2024-10-14change the tusb_rhport_init_t struct, exclude the rhport to make API more ↵hathach
consistent
2024-10-11change tusb_init(), tusb_rhport_init() to use init struct for expandabilityhathach
2024-10-10add new tusb_int_handler(rhport, in_isr) as common irq handlerhathach
update tusb_init() to take rhport and role, defined as macro with optional argument for backward compatible
2024-10-05Add MSOS 2.0 descriptor to auto load NCM driver on Windows.HiFiPhile
2024-10-05service_traffic: Don't call pbuf_free when ethernet_input is OkStéphane Lenclud
2024-08-19rename TUD_ENDPOINT_EXCLUSIVE_NUMBER to TUD_ENDPOINT_ONE_DIRECTION_ONLYhathach
2024-08-17define and use TUD_ENDPOINT_EXCLUSIVE_NUMBERhathach