Pico 2 host_device_info enumerates nothing after some warm resets

Open
#620 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
18/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
arduino, c, raspberry-pi
Domain
embedded-iot

Research direction

Start with examples/Host/Simple/host_device_info/host_device_info.ino, specifically the print_device_descriptor callback and its tuh_descriptor_get_*_string_sync() calls, and check the ignored USBHost.begin() return value. Compare against tinyusb's examples/host/device_info. Done means a reproducible cause for devices missing after warm resets on Pico 2, confirmed by repeated resets with the console open, and a fix that enumerates both devices every time.

Written by the indexing model from the issue text.

Description

follow-up

On the ci.lan farm's Raspberry Pi Pico 2, examples/Host/Simple/host_device_info (native host, FQBN
rp2040:rp2040:rpipico2:...,usbstack=tinyusb_host, rp2040 core 5.4.3) intermittently enumerates nothing after a warm
reset. The console prints the banner and then no Device attached line for the whole capture. The attached devices
are a General UDisk (abcd:1234) and a CH340 (1a86:7523).

Observed

  • HIL battery, roster commit b62b97e (library master, vendored TinyUSB dcd2a4bd0), two runs: host_device_info
    failed on the test pass (reported [], 32.4 s) and passed on the cleanup pass, which runs the same step, flash
    included.
  • Again in #619's run ard-registry-host-1 at 998752d (devices read from agentrc's board registry): test pass
    reported [] (32.4 s), cleanup pass [('abcd:1234', '\u0409')]. Pico W passed on the same run.
  • Manual session, hil_remote.py session exec <id> console --seconds 12 --reset (probe reset with the console open):
    • master firmware: devices enumerated on 1 of 4 resets;
    • firmware at #615's head 553c732 (TinyUSB d543126c5) plus the roster commit: enumerated on resets 2, 4 and 6,
      never on 1, 3, 5 or 7.
  • tinyusb's own host examples (device_info, msc_file_explorer, cdc_msc_hid) enumerated both devices on every
    flash in three farm runs on the same board and port.

The Pico 2's previous Kingston stick showed a similar failure on 2026-11-02 (HIL contract, Recovery).

Not established

The cause is not isolated: the library, the rp2040 core's host startup, the reset procedure and the devices' response
to a reset without a VBUS cycle all remain candidates. Source leads, unverified:

  • host_device_info.ino calls tuh_descriptor_get_*_string_sync() from the print_device_descriptor transfer
    callback, inside the host task; tinyusb's current examples/host/device_info defers those reads out of the callback.
    This matters once a device is attached, so it does not explain a missing Device attached.
  • The sketch ignores USBHost.begin()'s return value, so an initialisation failure would be silent.

Remaining work

  • Capture a failing reset on the wire (usb-sniffer on the Pico 2's host port) or with host-stack logging
    (CFG_TUSB_DEBUG) to see whether the bus reset, the first GET_DESCRIPTOR or the root-port connect detection fails.
  • Compare with tinyusb's device_info built for the same board under the same reset command.
  • Until fixed, the Arduino HIL host_device_info result on Pico 2 depends on the reset count.

Surfaced while replacing the Pico 2's thumb drive: #615, #619.

Dominant language
C
Stars
654
Forks
187
Avg merge
21h 1m
Merged PRs (30d)
17

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from adafruit/Adafruit_TinyUSB_Arduino

All issues in adafruit/Adafruit_TinyUSB_Arduino

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.