hil: mimxrt1064_evk host/cdc_msc_hid CDC echo reads nothing and the CH9102 serial reads 0 on master firmware

Open
#4,640 0 comments 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
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
c, embedded-iot

Research direction

Run the master d4e2fc345 firmware on the mimxrt1064_evk board using the HIL setup, then compare the result with 9adcc9304. If it passes, bisect d4e2fc345..9adcc9304, checking the usbh commits first; if it fails, inspect the CH9102 fixture and hub port. Done when the failure is attributed to a host-stack change or the fixture.

Written by the indexing model from the issue text.

Description

follow-up Prio 📌

Originating PR: https://github.com/hathach/tinyusb/pull/4639

Problem

On the ci.lan HIL rig, the mimxrt1064_evk host cells that use the CH9102 CDC peer fail deterministically (not intermittently). The failure reproduces on master's own firmware; #4639 changes only the ESP BSP, an ESP-relevant example and HIL harness Python and compiles nothing for mimxrt1064_evk.

Observed on ci.lan, 2026-12-04:

  • CI run https://github.com/hathach/tinyusb/actions/runs/47321073632/job/145003223661 (PR head eaeb51110):
    mimxrt1064_evk host/cdc_msc_hid: Failed: CDC echo mismatch at offset 0 (57 bytes) ... received: b'' CH9102: CDC Interface is mounted: address = 1, itf_num = 0 | CDC Interface is unmounted: address = 1, itf_num = 0. Every other mimxrt1064_evk cell passed in that job.
  • Isolated manual runs on ci.lan (hil_remote.py -b mimxrt1064_evk --retry 1, HIL_SHUFFLE_SEED=1796382346), each with one retry:
    • master 9adcc9304 firmware (CI artifact of run 46740897821) with the 9adcc9304 harness:
      • host/cdc_msc_hid red: CDC echo mismatch ... received: b'', CH9102 mounted then unmounted.
      • dual/host_info_to_device_cdc red: Expected ['1a86_55d4_52D2003414', '21c4_0cc7_90005893730A1A63'], Enumerated ['1a86_55d4_0', '21c4_0cc7_90005893730A1A63']; the CH9102 reports iSerialNumber as 0.
      • host/device_info passed in the same run and read SN 52D2003414. The other 19 cells passed.
    • PR firmware (byte-identical binaries for both cells: host/cdc_msc_hid.bin sha256 20e9cc02...f312443, dual/host_info_to_device_cdc.bin 91095bc4...5838ee): the same two cells red the same way.
  • History: host/cdc_msc_hid on mimxrt1064_evk last passed on master d4e2fc345 (run 46144685233). Master runs after 2026-11-29 failed this board at flash (J-Link), so no master run has executed the test since. Master between d4e2fc345 and 9adcc9304 changed usbh (0fbb65599, bb670f942).

Root cause is not established. The CH9102 mounting and then unmounting, and reading iSerialNumber 0 while host/device_info reads it correctly, fit either a host-stack regression or a fixture/hub-port problem.

Remaining work

Run master d4e2fc345 firmware on the board:

  • pass: bisect d4e2fc345..9adcc9304, usbh commits first.
  • fail: the CH9102 fixture or hub on that port.

Why deferred

Outside #4639's scope: it touches nothing this board builds, and the failure reproduces on master firmware.

Related: #4203 (stm32f723disco host/cdc_msc_hid CDC echo reads nothing, same symptom on another board and an intermittent one); #4317 (ea4088_quickstart host peers behind the J3 hub enumerate intermittently, a missing CH340 in the same jobs; whether it is related is unknown); #4618 (frdm_k64f host/cdc_msc_hid CDC echo byte corruption against the same CH9102 peer, different symptom).

Dominant language
C
Stars
7.3k
Forks
1.6k
Avg merge
1d 19h
Merged PRs (30d)
67

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 hathach/tinyusb

All issues in hathach/tinyusb

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.