<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git, branch hil-add-ea4088qs</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/tinyusb.git/atom/?h=hil-add-ea4088qs</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/?h=hil-add-ea4088qs'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-09-03T11:19:17Z</updated>
<entry>
<title>hil: add ea4088_quickstart with an RTT console</title>
<updated>2026-09-03T11:19:17Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-09-03T11:19:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=ea6739db33c7b6c9a984a8c115cb0384b479523f'/>
<id>urn:sha1:ea6739db33c7b6c9a984a8c115cb0384b479523f</id>
<content type='text'>
The board's probe is an LPC-Link2 with no VCOM, so its console is RTT. Two
host tests could not run that way: test_host_cdc_msc_hid and
test_host_msc_file_explorer opened the flasher's VCOM directly instead of
going through open_board_console(), and the config gate rejecting
is_cdc/is_msc fixtures on "logger": "rtt" boards existed only to keep them
from dying mid-run on a port that does not exist.

Route both through the console abstraction and drop the gate. The reset
ordering differs per console -- RTT owns the probe so the board must be reset
before the console opens, a VCOM survives the reset so it opens first -- and
that rule now lives in open_console_reset() instead of being spelled out at
each call site.

The roster entry runs device, host and dual: USB1's Type-A drives a hub with
a CH340 (TX-RX shorted, for the cdc echo) and a thumbdrive, while USB2 keeps
serving the device tests. BUFFER_SIZE_DOWN=128 because that echo writes up to
64 bytes at once and SEGGER's ring keeps one byte free, which the 16-byte
default cannot hold; 64 measured unreliable, 128 reliable.

Measured on the rig: 19 passed, 0 failed, 0 skipped. usbtest 30/30, host MSC
reads 682 KB/s, device CDC/MSC ~510 kB/s (full speed behind the rig's hub).
</content>
</entry>
<entry>
<title>examples: write the host cdc console over RTT when that is the console</title>
<updated>2026-09-03T11:19:17Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-09-03T11:19:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=74b846541c8a2b218753526c74aacbf19f68e288'/>
<id>urn:sha1:74b846541c8a2b218753526c74aacbf19f68e288</id>
<content type='text'>
console_write() forwards what the attached CDC device sent back to the
board's console, and reached for board_uart_write() directly to stay
non-blocking. On a board whose console is the debug probe there is no UART:
board_uart_write() is a stub returning -1, so everything the device echoed was
dropped, and the do/while loop retried a write that could never make progress
and spun until more data arrived.

Send it through SEGGER_RTT_Write() on LOGGER_RTT builds -- already
non-blocking in the default NO_BLOCK_SKIP mode, which is what the UART path
wanted board_uart_write() for.

The retry is also bounded now. board_uart_write() is only documented to
return the number of bytes sent, and the stubs disagree on how they say "no
console here" -- lpc40 returns -1, apm32f0xx returns 0 -- so the loop cannot
decide from the return value alone when to stop. It gives up after 10 ms
without progress instead, which no draining console ever hits, and keeps the
negative return as a fast path so a stub UART does not cost that wait on
every read.

The RTT header include lives in board_api.h so any example can reach it; the
include path only exists when LOGGER=rtt defines LOGGER_RTT.

host/cdc_msc_hid now passes on ea4088_quickstart, whose probe (LPC-Link2) has
no VCOM: the CDC echo round-trips through a CH340 with TX-RX shorted.
</content>
</entry>
<entry>
<title>ohci: enumerate a device that was already attached at init</title>
<updated>2026-09-03T11:19:17Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-09-03T11:19:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=4e7be0b8d07c4b8b7278ac96ba290f58a2ed51c3'/>
<id>urn:sha1:4e7be0b8d07c4b8b7278ac96ba290f58a2ed51c3</id>
<content type='text'>
hcd_init() clears every pending interrupt flag before enabling its own set:

  OHCI_REG-&gt;interrupt_status = OHCI_REG-&gt;interrupt_status;

If a device is already connected at that point, that write drops the RHSC
which went with the connect, while the root hub keeps ConnectStatusChange
set. The device stays put, so no new edge follows and the attach is never
reported - the port sits at CCS=1, CSC=1, PES=0 forever.

Host-only builds got away with it because the connect is usually detected
after that clear. In a dual build the device stack initialises first and
enables the shared USB interrupt, which moves the detection into the window
that gets cleared, and the host then never sees the device.

Scan the root-hub ports once at the end of hcd_init and raise the attach
ourselves, clearing the stale change bit so the next RHSC does not report
the same device again.

Verified on ea4088_quickstart: dual/host_info_to_device_cdc now enumerates
on a plain reset (HIL test passes, "Device 1: ID 1a86:8010 SN 7FD88F0604B5"),
host/device_info still enumerates, and device/cdc_msc is unaffected.
host/device_info also builds for lpcxpresso55s69, lpcxpresso1769 and mcb1800.
</content>
</entry>
<entry>
<title>dual: run host_info_to_device_cdc on ea4088_quickstart</title>
<updated>2026-09-03T11:19:17Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-09-03T11:19:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=b799fa0240416b1fd5215549852fde4a73a0be27'/>
<id>urn:sha1:b799fa0240416b1fd5215549852fde4a73a0be27</id>
<content type='text'>
The board has both USB ports wired: U1 to the Type-A host connector and U2
to the micro-B device connector, and board_init() already puts the port
select in that mode, so it can run the dual example.

- Allow the example on LPC40XX.
- Point the host stack at rhport 0: ohci maps the TinyUSB rhport onto its
  root-hub port index, and the host controller here is index 0, while the
  dual examples default to rhport 1.
- Move the string-descriptor buffers out of the stack. They are written by
  the host controller, so on parts whose USB master cannot reach the CPU
  stack (this family) the strings came back as garbage. host/device_info
  already keeps its transfer buffer in CFG_TUH_MEM_SECTION; do the same
  here.

Verified on ea4088_quickstart with a WCH-Link on the Type-A port and the
micro-B plugged into a PC:

  mounted device 1
  Device 1: ID 1a86:8010 SN 7FD88F0604B5
    iManufacturer       1     wch.cn
    iProduct            2     WCH-Link
</content>
</entry>
<entry>
<title>lpc40: make USB host work on ea4088_quickstart</title>
<updated>2026-09-03T11:19:17Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-09-03T11:19:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=4a57d2a5e22414621900eb2b87aebc5a45a6b3a5'/>
<id>urn:sha1:4a57d2a5e22414621900eb2b87aebc5a45a6b3a5</id>
<content type='text'>
Two things kept the OHCI host from ever seeing a device on the USB1 Type-A
connector:

- The family passed only CFG_TUSB_MEM_SECTION, but every example's
  tusb_config.h pre-defines CFG_TUD_MEM_SECTION/CFG_TUH_MEM_SECTION as
  empty, so tusb_option.h's fallback never applied and ohci_data landed in
  main SRAM at 0x1000_0000. The USB AHB master cannot reach it: the
  controller latched HcInterruptStatus.UE and never wrote the HCCA. Pass all
  three defines so the DMA structures land in peripheral SRAM.

- VBUS for the host port is switched by an STMPS2171 whose enable is active
  high, but USB_PPWR1 asserts low, so muxing P1.19 to FUNC2 held the switch
  off and the connector never had power. NXP's own lpcusblib HAL muxes the
  same pin the same way, which is why the vendor host example fails here
  too. Keep P1.19 a GPIO and drive it: high when the host stack is enabled,
  low otherwise, so a device-only build does not leave the switch enable
  floating.

host/device_info now enumerates:

  Device 1: ID 1a86:8010 SN 7FD88F0604B5   wch.cn / WCH-Link

device/cdc_msc still passes on HIL. Note the module has no VBUS source of
its own: its +5V rail must be fed (HDK USB, EXT_VIN or TRACE_5V pin 11) or
the switch has no input to pass.
</content>
</entry>
<entry>
<title>Merge pull request #3851 from hathach/etmtrace-rp2350</title>
<updated>2026-08-28T19:41:13Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-28T19:41:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=84dcec43c709643f8a1b1ebbab6d08fbbc605a6d'/>
<id>urn:sha1:84dcec43c709643f8a1b1ebbab6d08fbbc605a6d</id>
<content type='text'>
rp2350: ETM trace board pico2_etm_trace</content>
</entry>
<entry>
<title>docs: msc-host TUR retry handoff, split out of this PR</title>
<updated>2026-08-28T18:08:40Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-28T09:40:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=f7eb812679598aecc1d7702264ba48e6c178d5da'/>
<id>urn:sha1:f7eb812679598aecc1d7702264ba48e6c178d5da</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rp2350: PIO-USB runs the pico-sdk stock 150 MHz</title>
<updated>2026-08-28T18:08:40Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-28T09:40:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=839c324458f6900a58182d9aa23d846e8ec55c94'/>
<id>urn:sha1:839c324458f6900a58182d9aa23d846e8ec55c94</id>
<content type='text'>
Closes the sys-clock question. rp2350: the dynamic 156 MHz switch is
removed - 150 MHz soak-tested clean (and a runtime switch truncates ETM
capture on the trace carrier). rp2040 keeps its existing 120 MHz: soak
sweeps show 120 = 8/8, stock 125 = 0/3 (bulk-OUT collapses, device NAKs
~600:1 with zero CRC errors on the wire), and 132 = 2/10 flaky despite an
exact 12n/375k divider - no divider criterion predicts rp2040 PIO-USB
health (the RX state machine samples at raw sysclk), so only
soak-validated clocks ship.
</content>
</entry>
<entry>
<title>pico2_etm_trace: RP2350 board on the MIPI-20 ETM trace carrier</title>
<updated>2026-08-28T18:08:31Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-28T09:39:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=6e8e2caf7fc2dc5575f5e0c71e69c1b19b3f5699'/>
<id>urn:sha1:6e8e2caf7fc2dc5575f5e0c71e69c1b19b3f5699</id>
<content type='text'>
Board files for the trace carrier (console GP12/13, LED GP10, I2C GP8/9,
PIO-USB host on GP20, all retargeted in board.cmake so the SDK defaults
cannot mux a trace pin), compile-time trace pin-conflict checks, the
measured DBGPAUSE rationale, Ozone project, and skill/docs updates.
Trace validated at the stock 150 MHz (75 MHz TRACECLK, +1 ns sampling):
zero overflow through a 15 s throughput soak; V2 probe ceiling 120 MHz.
</content>
</entry>
<entry>
<title>Merge pull request #3860 from hathach/claude/hil-blindness</title>
<updated>2026-08-28T09:09:22Z</updated>
<author>
<name>Ha Thach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-28T09:09:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=64d952c027df194ea8b107b3d5d0b6c4cb9a994b'/>
<id>urn:sha1:64d952c027df194ea8b107b3d5d0b6c4cb9a994b</id>
<content type='text'>
hil: drop the sysfs blindness subsystem and derive the recovery reserve</content>
</entry>
</feed>
