<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/src/portable/renesas, 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/src/portable/renesas?h=worktree-ch569-hydrausb3</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/src/portable/renesas?h=worktree-ch569-hydrausb3'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-07-06T18:33:48Z</updated>
<entry>
<title>address review round 3: bound the ZLP deselect spin, quote the HIL uid</title>
<updated>2026-07-06T18:33:48Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-06T18:33:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=c5ec54234f405bac231ec7e417db986f3beb4556'/>
<id>urn:sha1:c5ec54234f405bac231ec7e417db986f3beb4556</id>
<content type='text'>
- dcd(rusb2): pipe_zlp_in()'s CURPIPE deselect wait gets the same spin bound as
  the other FIFO waits — it runs with the USB IRQ masked, where any stuck spin
  freezes the stack.
- test/hil: quote the board uid interpolated into the shell=True usbtest
  invocation.

Verified: ra4m1_ek 30/30 through the HIL battery.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01HeF2gZ1M7GWkz6Av4BpKPg
</content>
</entry>
<entry>
<title>address Codex/Copilot review findings (9 fixed, 3 refuted with evidence)</title>
<updated>2026-07-06T17:30:07Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-06T17:30:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=f41c1827b2b59d1a0bdfc28bbe6580e5c44ef961'/>
<id>urn:sha1:f41c1827b2b59d1a0bdfc28bbe6580e5c44ef961</id>
<content type='text'>
- dcd(rp2040): rewind IN staging before the clear-halt re-issue. Staging advances
  user_buf/remaining_len when packets are copied into DPRAM, before the host has
  consumed them; aborting and re-issuing from the advanced pointer silently
  skipped the staged-but-unsent bytes.
- dcd(ip3511): dcd_edpt_iso_activate aborts a transfer still armed from the
  previous altsetting (clear Active on both buffer slots) so the hardware can't
  keep servicing the old descriptor against the class's fresh queueing.
- dcd(rusb2): reuse an endpoint's existing pipe in dcd_edpt_open. usbd_edpt_close
  is a no-op on ISO_ALLOC ports, so a class's close/open across SET_INTERFACE
  would allocate a second pipe with the same EPNUM and leak pipes.
- class(vendor): the buffered-mode free-slot check also tests the interrupt
  endpoints, so an interrupt-only vendor interface isn't clobbered as "free".
- bsp(ch32v30x): board_get_unique_id respects max_len and copies bytes
  (alignment-safe) instead of writing 12 bytes through a uint32_t cast.
- test/hil/usbtest.py: treat same-serial multi-matches as ambiguous and retry
  until the dual-port stale node drops (nanoch32v203/ch32v307 variants); reprobe
  a binding that predates the dynamic-id re-registration so a stale capability
  profile can't survive; skip the remove_id/unbind cleanup after an unrecovered
  kernel-side hang (it would join the D-state convoy and deadlock the bus).
- usbtest skip.txt: add the families whose DCD refuses dcd_edpt_iso_alloc
  (CXD56, FT90X, LPC175X_6X, LPC40XX, NUC100/120/505, PIC32MZ, SAMG, SAMX7X,
  VALENTYUSB_EPTRI) — tier 4 cannot enumerate there.
- test/hil/tinyusb-sudoer: note that '#1000' is a sudoers UID specifier, not a
  comment (the review misread the grants as commented out).

Refuted in review threads: nrf5x ISOSPLIT keeps reserve-max per-configuration
allocation semantics (iso_alloc is per-config, not per-alt); the LPC EP-number
claim (default descriptor uses EP1-3; lpcxpresso11u37 passes 30/30 on HW); the
vendor alt-0 "abort" concern (host cannot address endpoints outside the active
altsetting; usbd_edpt_iso_activate resets state on re-entry).

Verified on hardware: raspberry_pi_pico, lpcxpresso11u37, ra4m1_ek all 30/30
through the HIL battery after the changes; builds clean incl. buffered-mode
vendor (webusb_serial).

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01HeF2gZ1M7GWkz6Av4BpKPg
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'origin/master' into usbtest</title>
<updated>2026-07-06T09:17:17Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-06T09:17:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=2d73cf58de9a41278a9c6e1e3c9e5c6626bf95b7'/>
<id>urn:sha1:2d73cf58de9a41278a9c6e1e3c9e5c6626bf95b7</id>
<content type='text'>
# Conflicts:
#	lib/rt-thread/port/msc_device_port.c
#	src/device/usbd.c
</content>
</entry>
<entry>
<title>usbtest: address remaining review findings (rusb2 #11/#12, vendor #15)</title>
<updated>2026-07-06T07:03:10Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-06T07:03:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=3345e80d843a6c13543311bf0eda8cd1bf40604f'/>
<id>urn:sha1:3345e80d843a6c13543311bf0eda8cd1bf40604f</id>
<content type='text'>
#12 dcd(rusb2): key the bulk-OUT clear-stall re-arm on a new per-pipe `queued`
   flag instead of `pipe.buf != NULL`. A zero-length OUT read leaves buf==NULL
   while still armed, so the old test skipped the re-assert and the endpoint
   NAKed forever after CLEAR_FEATURE(HALT). `queued` is set at submit and
   cleared at completion (and on pipe teardown).
#11 dcd(rusb2): retry a zero-length IN packet that couldn't be queued at submit
   (double-buffered pipe full, host not draining). Previously the ZLP was
   dropped and the next BRDY reported a phantom completion for a packet the host
   never received; now it's deferred to BRDY via `zlp_pending` and only
   completes once actually queued and sent.
#15 vendor: collapse the byte-identical bulk/interrupt/isochronous non-buffered
   write / write_available / read_xfer triples into three shared static-inline
   helpers keyed on (endpoint, epbuf, bufsize).

Verified on ra4m1_ek: usbtest tier-4 30/30 (rusb2 + vendor refactor); pre-commit
(format/codespell/unit) clean. The nRF54LM20 DK also passes 30/30 at high speed.

Co-Authored-By: Claude Opus 4.8 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01HeF2gZ1M7GWkz6Av4BpKPg
</content>
</entry>
<entry>
<title>dcd(rusb2): bound the FIFO-ready wait so a full IN pipe can't freeze the stack</title>
<updated>2026-07-05T10:02:40Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-05T10:02:40Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=6535484c1e86d9ba1f42d99aed0fb7cd8bff2342'/>
<id>urn:sha1:6535484c1e86d9ba1f42d99aed0fb7cd8bff2342</id>
<content type='text'>
pipe_wait_for_ready() spun on FRDY (and CURPIPE) with no bound while the USB IRQ
is masked (dcd_edpt_xfer runs under dcd_int_disable). When a double-buffered IN
pipe has both planes full it never sets FRDY until the host drains it, and a
no-handshake iso IN endpoint the host has stopped polling never drains at all,
so the loop hangs forever and the device stops servicing USB entirely - every
later transfer and SET_INTERFACE(alt) then times out.

The Linux usbtest battery hits this within a few cases: the example source pumps
keep loading the iso IN pipe while the host runs a non-iso case, both planes
fill, and the next refill wedges. Bound the wait and abort the FIFO access on
timeout (drop the load; a BRDY or the next re-arm retries). This hardens every
rusb2 board, not only usbtest.

Two per-endpoint fixes the same battery needs:
- pipe0_xfer_out: NAK the single-buffer DCP once a control-OUT data stage
  completes, so usbd's next back-to-back data packet is not accepted into the
  just-emptied buffer and then BCLR-discarded (usbtest ctrl_out 14/21).
- dcd_edpt_clear_stall: re-assert PID_BUF when clearing halt on a bulk OUT that
  still has a receive armed, otherwise it NAKs forever (usbtest toggle 29).

Verified on ra4m1_ek (R7FA4M1AB, full speed): Linux testusb tier-4 (30 cases
across bulk/control/interrupt/isochronous incl. sg, unlink, halt, toggle, perf)
goes from a flaky permanent wedge (unpatched driver hangs by case 9) to 30/30
across 7 reflash cycles, including the host driver-unbind cleanup path. Full
ra4m1_ek example set builds.

Ref: RA4M1 UM R01UH0887EJ DCPCTR.PID, DnFIFOCTR.FRDY.

Co-Authored-By: Claude Opus 4.8 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01HeF2gZ1M7GWkz6Av4BpKPg
</content>
</entry>
<entry>
<title>dcd: retire dcd_edpt_close() on the iso-migrated drivers</title>
<updated>2026-07-03T10:46:21Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-03T10:46:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=b218b477a3c841f3f59cf0a6d34cfcd7a86ca8fb'/>
<id>urn:sha1:b218b477a3c841f3f59cf0a6d34cfcd7a86ca8fb</id>
<content type='text'>
Now that ip3511, rusb2 and nrf5x are on ISO_ALLOC, the stack's usbd_edpt_close()
is a no-op for them, so dcd_edpt_close() is no longer a public DCD entry point.
Audit of the remaining callers:

- ip3511, nrf5x: dcd_edpt_close_all() does its own teardown and no longer calls
  dcd_edpt_close() -&gt; it is dead code, removed.
- rusb2: dcd_edpt_close_all() still tears down each pipe via it -&gt; kept but made
  a static internal helper (edpt_close), not a public dcd_ API.

Revert dcd.h to declaring dcd_edpt_close() only under TUP_DCD_EDPT_CLOSE_API (for
the remaining close-API MCUs); ISO_ALLOC IPs declare iso alloc/activate instead.

Behaviour-neutral (removed/renamed uncalled functions); dwc2 still builds and
nrf5x still passes bulk/iso/halt on hardware.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01HeF2gZ1M7GWkz6Av4BpKPg
</content>
</entry>
<entry>
<title>dcd: implement iso alloc/activate for rusb2, ip3511, nrf5x; deprecate CLOSE_API for them</title>
<updated>2026-07-03T10:14:20Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-03T10:14:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=d28628b52beb40b10258eb063acb247ce59a6bc8'/>
<id>urn:sha1:d28628b52beb40b10258eb063acb247ce59a6bc8</id>
<content type='text'>
Migrate the ip3511, rusb2 and nrf5x DCDs off the deprecated TUP_DCD_EDPT_CLOSE_API
path onto the unified ISO_ALLOC model by implementing dcd_edpt_iso_alloc/activate
(previously #if0 stubs / returning false):

- rusb2: iso_alloc reserves an ISO-capable pipe (1/2) once and configures it;
  iso_activate re-arms it in place (PIPEMAXP + SQCLR + PID_BUF) with no pipe
  free/realloc, avoiding PIPESEL/PIPECFG churn across altsetting changes.
- ip3511: iso_alloc reserves the EP command/status entry (type=ISO, INTEN);
  iso_activate clears stall + resets the data toggle.
- nrf5x: iso_alloc validates the fixed EP8; iso_activate enables ISOOUT/ISOIN
  (with ISOSPLIT when both directions are active) + SOF, mirroring dcd_edpt_open.

tusb_mcu.h no longer defines CLOSE_API for these three (they fall through to
ISO_ALLOC); dcd_edpt_close is now declared unconditionally in dcd.h since these
drivers still use it internally from dcd_edpt_close_all(). The remaining CLOSE_API
MCUs (mm32, pic, da1469x, f1c100s, ch32-usbhs) are left for a later per-board pass.

Verified on hardware: ip3511 (lpcxpresso11u37) 29/30 and nrf5x (feather_nrf52840)
iso 11/11 via the new path (identical to their prior CLOSE_API results); dwc2,
fsdev, rp2040 + audio/video still build. rusb2 (ra4m1) has a separate,
iso-independent set_interface wedge (still 1/30) tracked for follow-up.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01HeF2gZ1M7GWkz6Av4BpKPg
</content>
</entry>
<entry>
<title>license: use SPDX identifiers for src/ headers (#3749)</title>
<updated>2026-07-02T14:55:45Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-02T14:55:45Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=7a4111b96ef6279e75579f9a18443834f6a0871d'/>
<id>urn:sha1:7a4111b96ef6279e75579f9a18443834f6a0871d</id>
<content type='text'>
* license: use SPDX identifiers for src/ headers

Replace the full ~20-line MIT license boilerplate on every src/ file with a
two-line SPDX tag (SPDX-FileCopyrightText + SPDX-License-Identifier), following
the REUSE convention used by CircuitPython and the Linux kernel. Removes ~3500
lines of duplicated boilerplate.</content>
</entry>
<entry>
<title>fix some Wconversion warnings</title>
<updated>2026-04-17T03:16:31Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-04-16T17:10:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=a6dcc3f089bd4468949ea9e138fea9f80025577e'/>
<id>urn:sha1:a6dcc3f089bd4468949ea9e138fea9f80025577e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>update hcd rusb2 to use tu_hwfifo read/write</title>
<updated>2026-01-04T10:02:16Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-01-03T18:01:52Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=a9479f5ad96c28747661d9392ac28698f84c7bac'/>
<id>urn:sha1:a9479f5ad96c28747661d9392ac28698f84c7bac</id>
<content type='text'>
</content>
</entry>
</feed>
