<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/src/portable/mentor, 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/mentor?h=worktree-ch569-hydrausb3</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/src/portable/mentor?h=worktree-ch569-hydrausb3'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-07-06T09:17:17Z</updated>
<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>dcd(musb): flush TX FIFO on halt and don't load a disarmed endpoint</title>
<updated>2026-07-04T12:47:31Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-07-04T12:47:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=1a588a3c7d89e0d3c2f187431902280532ab4089'/>
<id>urn:sha1:1a588a3c7d89e0d3c2f187431902280532ab4089</id>
<content type='text'>
Device-&gt;host bulk/interrupt IN transfers failed the Linux usbtest read tests
(babble -75 on HS, NAK -110 on FS) because the usbtest bind issues SET/CLEAR
endpoint-halt before reading:

- dcd_edpt_stall sent SEND_STALL and cleared pipe-&gt;armed but never flushed the
  TX FIFO. Device-mode SendStall does not auto-flush (only host-mode STALLED
  does; see TM4C123 SPMS374 / MSP432E4 SLAU723 USBTXCSRL FLUSH bit), so the
  in-flight transfer's staged packets survived the halt.
- process_epin_isr kept loading on remaining&gt;0 without checking armed, so after
  the halt disarmed the pipe it re-filled the FIFO with the aborted transfer;
  the next re-armed transfer's data then stacked on top and the host read an
  oversized packet -&gt; babble.

Flush the FIFO before SEND_STALL (which clears the TXRDY hwfifo_flush gates on)
and bail out of process_epin_isr when the pipe is not armed.

Verified: max32666fthr (HS musb) and ek_tm4c123gxl (FS musb) both 30/30.

Co-Authored-By: Claude Opus 4.8 &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>dcd/musb: extract pipe0_data_stage_done() and fix two EP0 comments</title>
<updated>2026-06-16T04:09:40Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-16T04:09:40Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=ba3b2453e7cbf3572663dd1b7eadafdcc6b0a912'/>
<id>urn:sha1:ba3b2453e7cbf3572663dd1b7eadafdcc6b0a912</id>
<content type='text'>
Cleanup from a code-review pass, no behavior change:
- Replace the open-coded "last DATA packet" test (remain_wlength == 0 ||
  len &lt; CFG_TUD_ENDPOINT0_SIZE), duplicated in the edpt0_xfer DATA IN
  arm, pipe0_process_xfer_state_isr, and the DATA OUT drain, with one
  inline pipe0_data_stage_done() so IN and OUT can't drift.
- Correct the xact_len comment (only the IN path reports it; OUT reports
  count0) and the dcd_edpt_stall comment (a deferred SETUP means the old
  transfer ended on the wire, not that its status stage was "seen").

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>dcd/musb: rename pipe0_process_status_isr -&gt; pipe0_process_xfer_state_isr</title>
<updated>2026-06-15T16:26:22Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-15T16:24:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=148fabb96b16fe0899004ba71d6447ec3995cf55'/>
<id>urn:sha1:148fabb96b16fe0899004ba71d6447ec3995cf55</id>
<content type='text'>
The helper advances the whole EP0 control state machine on a
completion/confirmation IRQ — it dispatches on pipe0-&gt;state and also
fires the DATA_IN completion, not just the status stage — so
"process_status" undersold it. Matches the process_*_isr family.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>dcd/musb: harden EP0 DATA_OUT against short packet and host overrun</title>
<updated>2026-06-15T15:50:01Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-15T15:50:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=f1080e158aeec31faee0f3371d2d5c6f624dd4f4'/>
<id>urn:sha1:f1080e158aeec31faee0f3371d2d5c6f624dd4f4</id>
<content type='text'>
Mirror the IN-side short-packet fix on the OUT drain: end the data
stage (-&gt; STATUS_IN) when wLength is received OR a short OUT packet
(count0 &lt; CFG_TUD_ENDPOINT0_SIZE) signals the host's end-of-data, not
only when remain_wlength hits exactly 0. Also clamp the
remain_wlength subtraction so a host that overruns wLength can't
underflow it and strand the transfer.

Without this, a control-OUT whose host sends fewer bytes than wLength
left pipe0 in DATA_OUT; usbd then armed STATUS IN and tripped the
split's TU_ASSERT(!dir_in). Found by /code-review; conformant hosts
send exactly wLength so HIL was already green.

Verified: HIL pass on ek_tm4c123gxl and max32666fthr (13/13 each).

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>dcd/musb: read EP0 SETUP into uint32_t[2], drop the double copy</title>
<updated>2026-06-15T15:19:34Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-15T15:19:34Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=3d9468152c44148c6881fb3f30ff3dae91a09b68'/>
<id>urn:sha1:3d9468152c44148c6881fb3f30ff3dae91a09b68</id>
<content type='text'>
pipe0_read_setup() copied the FIFO into a local union, then copied that
into the caller's struct. Read the two FIFO words straight into the
caller's uint32_t[2] (one copy) and cast to tusb_control_request_t* in
pipe0_start_setup(). pipe0.deferred_setup becomes uint32_t[2] so the
deferral path reads directly into it as well.

Verified: HIL pass on ek_tm4c123gxl and max32666fthr (13/13 each).

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>dcd/musb: extract pipe0_process_status_isr() to de-dup EP0 tail paths</title>
<updated>2026-06-15T15:08:41Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-15T09:48:40Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=d4eeaf10cb1a95b6b74e18cd933c6320d31c2031'/>
<id>urn:sha1:d4eeaf10cb1a95b6b74e18cd933c6320d31c2031</id>
<content type='text'>
The deferral (RXRDY-combined) and csrl==0 tail paths in process_ep0_isr
ran the same per-state status-stage logic. Move all of it into one
pipe0_process_status_isr() helper covering every state including
DATA_IN, which picks STATUS_OUT vs STATUS_OUT_PENDING_IRQ from
deferred_setup_valid (a deferred SETUP means the status confirm was
coalesced with it). Both callers now just invoke the helper; the
deferral path saves the SETUP and sets deferred_setup_valid first.

Also drops the deferral path's TU_ASSERT(remain_wlength == 0), which
was wrong for a short last DATA-IN packet, and renames
pipe0_process_deferred_setup -&gt; pipe0_try_deferred_setup (it no-ops
when nothing is deferred).

Verified: HIL pass on ek_tm4c123gxl and max32666fthr (13/13 each),
including the #3643 high-CPU-load IRQ-toggle coalescing stress.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>dcd/musb: suffix ISR-context process_* handlers with _isr</title>
<updated>2026-06-15T09:43:10Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-15T09:43:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=9562f54f95da485c17192b07a9b2cc21126c8ef1'/>
<id>urn:sha1:9562f54f95da485c17192b07a9b2cc21126c8ef1</id>
<content type='text'>
Rename process_ep0/process_epin/process_epout/process_bus_reset (all
invoked only from dcd_int_handler) to *_isr, making their ISR context
explicit at every call site. pipe0_process_deferred_setup is left
as-is since it also runs from task context (dcd_edpt_stall).

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>dcd/musb: end EP0 IN data stage on short packet, split DATA case</title>
<updated>2026-06-15T09:42:10Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-15T09:42:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=abc3114d53aee421a0a457ece561ac000ace2c67'/>
<id>urn:sha1:abc3114d53aee421a0a457ece561ac000ace2c67</id>
<content type='text'>
A short IN control response (device sends fewer bytes than wLength —
e.g. the 18-byte device descriptor answering a 64-byte GET_DESCRIPTOR)
left remain_wlength != 0, so the DATA_IN -&gt; STATUS_OUT transition never
fired and pipe0 stayed in DATA_IN through the status stage. usbd then
armed the status-OUT while state was still DATA_IN. Set DATAEND and
transition on the last packet: remain_wlength == 0, or a short packet
(incl. a terminating ZLP) which ends the data stage.

With state now tracking the stage, split edpt0_xfer's DATA handling
into separate DATA_IN / DATA_OUT cases dispatching on state (asserting
state == call direction) instead of the combined dir_in branch.

Verified: HIL pass on ek_tm4c123gxl and max32666fthr (13/13 each),
including the #3643 high-CPU-load IRQ-toggle coalescing stress.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
