<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/src/portable, branch dcd_ch32hs_spd</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/tinyusb.git/atom/src/portable?h=dcd_ch32hs_spd</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/src/portable?h=dcd_ch32hs_spd'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-06-23T12:10:23Z</updated>
<entry>
<title>dcd/ch32hs: implement speed selection</title>
<updated>2026-06-23T12:10:23Z</updated>
<author>
<name>HiFiPhile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-06-23T12:10:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=de01a33b84243b3e10fcd225faf368d5cefaed57'/>
<id>urn:sha1:de01a33b84243b3e10fcd225faf368d5cefaed57</id>
<content type='text'>
Signed-off-by: HiFiPhile &lt;admin@hifiphile.com&gt;
</content>
</entry>
<entry>
<title>dcd/ch32hs: drop OUT packet whose data toggle doesn't match</title>
<updated>2026-06-23T08:26:08Z</updated>
<author>
<name>HiFiPhile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-06-23T08:07:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=ca89edf2ef46484cf56bf1efbaf3a7b14616eeac'/>
<id>urn:sha1:ca89edf2ef46484cf56bf1efbaf3a7b14616eeac</id>
<content type='text'>
Signed-off-by: HiFiPhile &lt;admin@hifiphile.com&gt;
</content>
</entry>
<entry>
<title>dcd/ch32hs: defer bus reset event for proper speed detection</title>
<updated>2026-06-23T08:26:08Z</updated>
<author>
<name>HiFiPhile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-06-23T08:06:50Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=030bb962aed6efba443221660fb13f6dbd3ae710'/>
<id>urn:sha1:030bb962aed6efba443221660fb13f6dbd3ae710</id>
<content type='text'>
Signed-off-by: HiFiPhile &lt;admin@hifiphile.com&gt;
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'origin/master' into add-ch58x-usbfs</title>
<updated>2026-06-22T08:36:37Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-22T08:36:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=706e4a5daaf8bbb55f0a7d00b69d4bc3c4cd70eb'/>
<id>urn:sha1:706e4a5daaf8bbb55f0a7d00b69d4bc3c4cd70eb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>hw/bsp+wch: rename the CH58x family to ch583 and OPT_MCU_CH58X to OPT_MCU_CH583</title>
<updated>2026-06-22T08:23:08Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-22T08:23:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=eda704ca1acef9691b51e17026765f497b1fffbe'/>
<id>urn:sha1:eda704ca1acef9691b51e17026765f497b1fffbe</id>
<content type='text'>
The BSP family and MCU option were named "ch58x"/"CH58X", but the supported part is
the CH583/CH582 (and the SDK repo is openwch/ch583); CH585 is a separate MCU family,
so the CH58x umbrella was misleading. Rename to the specific family:

- hw/bsp/ch58x -&gt; hw/bsp/ch583 (dir), and the BSP-local files ch58x_it.* -&gt;
  ch583_it.*, system_ch58x.* -&gt; system_ch583.* (include guards/refs updated). The
  vendor SDK files (CH58x_common.h, CH58x_*.c in hw/mcu/wch/ch583) keep their names.
- OPT_MCU_CH58X -&gt; OPT_MCU_CH583 in tusb_option.h, tusb_mcu.h, and the shared WCH
  USBFS driver (ch32_usbfs_reg.h, dcd_ch32_usbfs.c). OPT_MCU_CH582 is kept as an
  alias (same value), so either name selects the same code.
- FAMILY_MCUS CH58X -&gt; CH583, CFG_TUSB_MCU=OPT_MCU_CH583, mcu:CH58X -&gt; mcu:CH583 in
  the example skip lists, the CI build matrix (ci_set_matrix.py), the get_deps family
  tag, and docs/reference/boards.rst.

Board names (ch582m_evt, yd-ch582m) are unchanged. Verified: make + cmake build for
ch582m_evt, and ci.lan HIL (all device examples pass).

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>dcd/wch: drop toggle-mismatched OUT packets on all USBFS variants</title>
<updated>2026-06-20T01:36:25Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-20T01:36:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=cca6fe64e95175cbefcdae1d1306ea8765a075d9'/>
<id>urn:sha1:cca6fe64e95175cbefcdae1d1306ea8765a075d9</id>
<content type='text'>
The OUT data-toggle check -- drop a packet whose DATA0/DATA1 doesn't match the
expected toggle (a host retransmit after a lost ACK, or a host that doesn't
alternate the toggle) -- only ran on CH58x. The auto-toggle parts (V103/V20x/V307/
X035) never checked it, so a duplicate/retransmitted OUT was processed twice.
HiFiPhile confirmed it: a host patched to send DATA0-only had CH32V305 accept every
packet. Move the TOG_OK gate out of the CH58x-only block so it runs on every variant;
the manual toggle flip stays CH58x-only. EP0 keeps its own toggle via the SETUP/status
flow and is exempt.

Verified on ci.lan HIL: ch582m_evt (CH58x), ch32v103r_r1_1v0 (V103), nanoch32v203
(V203) all pass.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>dcd/ch58x: preserve the DEV_ADDR general-purpose bit on SET_ADDRESS</title>
<updated>2026-06-19T16:08:39Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-19T16:00:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=31543c17a9c15c1c6e9a6c8d39be10aaa184e4f1'/>
<id>urn:sha1:31543c17a9c15c1c6e9a6c8d39be10aaa184e4f1</id>
<content type='text'>
dcd_edpt0_status_complete() wrote the full SET_ADDRESS wValue into R8_USB_DEV_AD,
clobbering bit 7, which on CH58x is a user general-purpose flag (only bits [6:0]
are the device address). Mask to 7 bits and preserve bit 7, matching the removed
dcd_ch58x_usbfs.c. CH58x-scoped; other parts keep the full write.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>dcd/ch58x: drop stale EP0 transfer state on SETUP</title>
<updated>2026-06-19T15:59:59Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-19T15:59:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=9aa0ab4b675ab2c3880cb5ed440d3d04b944f77f'/>
<id>urn:sha1:9aa0ab4b675ab2c3880cb5ed440d3d04b944f77f</id>
<content type='text'>
The PID_SETUP handler armed the new control transfer but left any in-flight EP0
transfer from the previous request marked valid, so a spurious EP0 IN/OUT could run
update_in()/update_out() against stale state (the removed dcd_ch58x_usbfs.c invalidated
both EP0 directions on every SETUP). Clear xfer[0] IN/OUT validity when a SETUP arrives.
Applies to all WCH USBFS parts -- a new SETUP always supersedes a pending control xfer.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>dcd/ch58x: report bus resume instead of a second suspend</title>
<updated>2026-06-19T15:58:17Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-19T15:58:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=a5292288b20abbfa3990a4dbc3acf8ff650c5e5b'/>
<id>urn:sha1:a5292288b20abbfa3990a4dbc3acf8ff650c5e5b</id>
<content type='text'>
The USBFS SUSPEND interrupt fires on both the suspend and the resume edge, but the
handler unconditionally posted DCD_EVENT_SUSPEND. On CH58x tud_resume_cb() therefore
never ran, and a device that lowered clocks/power in tud_suspend_cb() was never told
to restore them. Read MIS_ST's suspend bit (1 while suspended, 0 once resumed) to emit
DCD_EVENT_RESUME on the wake edge -- what the removed dcd_ch58x_usbfs.c did. Scoped to
CH58x via #if; the CH32 parts keep their existing behavior.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>dcd/ch58x: advance EP0 OUT data toggle for multi-packet control transfers</title>
<updated>2026-06-19T15:55:54Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-06-19T15:55:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=58b5447b606b49c76187c48e5b76690f4a111143'/>
<id>urn:sha1:58b5447b606b49c76187c48e5b76690f4a111143</id>
<content type='text'>
The manual-toggle ISR skipped EP0 entirely (if (ep != 0)), so EP0's RX data toggle
was set to DATA1 once at SETUP and never advanced. A control-OUT whose data stage
exceeds the EP0 packet size (a vendor/WebUSB OUT, a large HID SET_REPORT, or an
HS DFU download) desynced on the second packet and stalled.

EP0 has no hardware auto-toggle on CH58x (per the datasheet RB_UEP_AUTO_TOG applies
only to EP1/2/3/5/6/7), so flip its RX toggle on every OUT and always process the
packet -- restoring what the removed dcd_ch58x_usbfs.c did. The HIL examples keep
their control-OUT data stages within a single packet, so this was latent.

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
