<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/src/common, branch claude/add-systemview-debug</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/tinyusb.git/atom/src/common?h=claude%2Fadd-systemview-debug</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/src/common?h=claude%2Fadd-systemview-debug'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-09-03T23:06:25Z</updated>
<entry>
<title>sysview: fix cycle-3 review findings</title>
<updated>2026-09-03T23:06:25Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-09-03T23:06:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=633e074a0b9effbfbb84c93695e52fb75009564c'/>
<id>urn:sha1:633e074a0b9effbfbb84c93695e52fb75009564c</id>
<content type='text'>
- kill_traffic(): stop the recording at --duration-ms exactly, then reap
  the workload, instead of waiting on it (up to 60s) before -stop
- sysview_report.py: key open_calls by (func id, context) so interleaved
  callers of the same function don't cross-pair CALL/RET
- build.yml: intersect the sysview dep-fetch board list with the PR's own
  HIL selection (tinyusb.json vs hfp.json), and skip entirely when HIL is
  not running for this PR
- nrf54h20dk: shrink SYSVIEW_BUFFER_SIZE_DEFAULT to 4096 -- .data/.bss sit
  in the 32 KiB primary RAM, so the family's 65536 default fails to link
- tusb_sysview.c: copy pcTaskName into a local buffer at snapshot time so
  a task deleted mid-lap can't leave SendTaskInfo() dereferencing a freed TCB
- sysview_ci.py: drop a comparison against a baseline whose capture config
  (example/workload/duration_s) changed, and fail cdc_burst when the link
  stays enumerated but echoes nothing back
- SKILL.md: document the WCH post-mortem dump path (OpenOCD, no J-Link)
</content>
</entry>
<entry>
<title>sysview: take the timestamp from a BSP hardware timer where the core has no DWT</title>
<updated>2026-09-03T21:21:57Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-09-03T10:14:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=5a0d707dd96ae7821d97793b441b86aabb684855'/>
<id>urn:sha1:5a0d707dd96ae7821d97793b441b86aabb684855</id>
<content type='text'>
Cortex-M0/M0+, the WCH RISC-V parts and MAX3266x have no usable DWT cycle
counter, so their family.c provides SEGGER_SYSVIEW_X_GetTimestamp() from a
free-running hardware timer: a 32-bit general-purpose timer on ST parts
(sysview_stm32_tim2.h), SysTick-extended sources on the M0 families, the
core's SysTick-equivalent on WCH with the documented ordered read of the
split count registers (sysview_wch_timestamp.h), and a TMR on MAX3266x
(sysview_max32_tmr.h).

max32666fthr's DWT implements only watchpoint comparators (DWT_CTRL.NOCYCCNT=1
read live; UG6971 documents no DWT/trace at all), so SystemView's ARMv7-M
default read 0xE0001004 as a frozen 0 and every duration decoded as zero. The
TMR runs at 48 MHz (f_PCLK = f_SYS_CLK/2; Continuous mode, CMP=0xFFFFFFFF,
prescaler 1 - UG6971 15.2 guarantees TMRn_CNT readable while counting); TMR0
by default - present on every MAX32 part, unused by the examples, FreeRTOS
ticks on SysTick - overridable with -DSYSVIEW_MAX32_TMR=n. The family builds
SystemView with SEGGER_SYSVIEW_CORE_OTHER and sets CFG_TUSB_SYSVIEW_TIMESTAMP_BSP,
a tusb_sysview.c opt-in for ARMv7-M parts without CYCCNT where the BSP also
reports the rate via SEGGER_SYSVIEW_X_GetTimestampFreq(); the fixed-1MHz
microsecond contract is unreachable on a powers-of-two-only prescaler.
SEGGER_SYSVIEW_X_GetInterruptId() gains the ICSR.VECTACTIVE read for
CORE_OTHER builds. MAX32650/32690 use different GCR clock-gate names and stay
unported. Measured on the rig: seven host-timed 1.000 s gaps at
1.00044-1.00091 (median +0.05%).

stm32f0 refuses to configure SYSVIEW for stm32f070xb at CMake time: that
variant has no TIM2 at all, and the alternative was an undefined-reference
link error with no hint.

The shared hw/bsp/sysview_*.h join ci_select rule 16's hw/bsp file list
(cross-family build files, compiled only under -DSYSVIEW which no CI leg
enables), mirrored in the spec's rule table, so master's classification
guard resolves them on both axes.
</content>
</entry>
<entry>
<title>sysview: instrument usbd/usbh, dcd/hcd and class-driver call sites</title>
<updated>2026-09-03T21:21:57Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-11T10:07:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=3baa7c8fbafd2cbccc5810626ebbfaa50c0ea4da'/>
<id>urn:sha1:3baa7c8fbafd2cbccc5810626ebbfaa50c0ea4da</id>
<content type='text'>
Level 2 marks the stack's task-side entry points (tud_task/tuh_task inner
loop, usbd_edpt_xfer, control transfers); level 3 adds the class drivers
(cdc, msc) and the rp2040 dcd/hcd as the reference portable layer. All
call sites compile away below their level.
</content>
</entry>
<entry>
<title>sysview: leveled CFG_TUD/TUH_SYSVIEW instrumentation core</title>
<updated>2026-09-03T21:21:57Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-11T10:07:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=4158178230ec491c7eef03df6bbbd8c46811805c'/>
<id>urn:sha1:4158178230ec491c7eef03df6bbbd8c46811805c</id>
<content type='text'>
tusb_sysview.{c,h} carry the SystemView glue: the TU_SV_* event/function-name
table (offset TU_SV_EVENT_BASE 512), module registration, the leveled
CFG_TUD_SYSVIEW/CFG_TUH_SYSVIEW gates (1 = ISR only, 2 = +stack call sites,
3 = +class drivers), per-task stack high-water reporting with a cached
snapshot refreshed once per rotation, and the dual-role guard that collapses
double-recording when device and host share one vector.

ISR exit emits RecordExitISRToScheduler() when SCB-&gt;ICSR.PENDSVSET is set at
exit (Cortex-M0/M3+), so FreeRTOS captures don't show a causeless task switch
after every USB ISR; RISC-V keeps the plain exit record.

Unit-tested under ceedling against a fake SEGGER_SYSVIEW.h vendor header.
</content>
</entry>
<entry>
<title>Merge pull request #3828 from dxbjavid/ep2drv-endpoint-bound</title>
<updated>2026-09-01T08:42:39Z</updated>
<author>
<name>Zixun LI</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-09-01T08:42:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=f4697a0626ffa81617c457c93b64e3c3816c1af0'/>
<id>urn:sha1:f4697a0626ffa81617c457c93b64e3c3816c1af0</id>
<content type='text'>
bound endpoint number in tu_bind_driver_to_ep_itf</content>
</entry>
<entry>
<title>examples: document and work around the i.MX RT and LPC55 USB errata</title>
<updated>2026-08-18T15:07:49Z</updated>
<author>
<name>hathach</name>
<email>thach@tinyusb.org</email>
</author>
<published>2026-08-16T18:02:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=19ff2ed615e4a97984aab5551ac8835ead53b9e7'/>
<id>urn:sha1:19ff2ed615e4a97984aab5551ac8835ead53b9e7</id>
<content type='text'>
ERR050101: while an isochronous IN endpoint is active, an IN token addressed to
that same endpoint number on ANOTHER device sharing the host can silently
unprime one of this device's OUT endpoints - control, bulk, interrupt or
isochronous alike. NXP states it cannot be detected by software and raises no
interrupt, so the endpoint simply stops answering and the transfer never
completes.

The workaround is a uniqueness requirement rather than a particular number: the
isochronous IN endpoint must not share its number with any IN endpoint in use on
the bus. One family-wide constant therefore defeats it, since two affected
boards on the same hub then pick the same number and each becomes the other's
aggressor. CFG_TUSB_MIMXRT1XXX_ERRATA_ERR050101 is set only for the parts whose
errata list it - RT1015, RT1020, RT1024 and RT1050, where it is marked no fix
scheduled, plus RT1060 and RT1064 rev A - so RT1010 and the RT11xx family keep
the ordinary number and cannot collide with an affected board beside them.
Several affected boards on one hub can still be given distinct numbers with
-DEPNUM_ISO_IN.

The guard covers every example that has an isochronous IN endpoint: audio_test,
audio_4_channel_mic, uac2_headset, cdc_uac2, usbtest, video_capture and
video_capture_2ch. The video examples move the endpoint only when streaming
isochronously, since the bulk configuration is unaffected, and video_capture_2ch
takes two numbers because it has two streams.

The macro name follows CFG_TUSB_RP2_ERRATA_E2/E4/E15 already in tree, and its
is fixed, and which cannot be told apart at compile time - a way to define it to
0.

device_issues.rst records ERR050101 against every affected part with a link to
each errata sheet, and adds the LPC55S2x USB.3 speed-detection and USB.5
isochronous IN entries, neither of which TinyUSB works around. The branch's
design notes are included under docs/superpowers.

Verified: 340 wedge-free runs on mimxrt1064_evk, which previously wedged within
hours, and the macro resolving to endpoint 0x87 on mimxrt1064_evk against 0x83
on mimxrt1010_evk and stm32f407disco.
</content>
</entry>
<entry>
<title>bound endpoint number in tu_bind_driver_to_ep_itf</title>
<updated>2026-08-17T15:30:57Z</updated>
<author>
<name>Javid Khan</name>
<email>dxbjavid@gmail.com</email>
</author>
<published>2026-08-17T15:26:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=53567226fce0e7be7e7b5e7a019d0f4d14064c33'/>
<id>urn:sha1:53567226fce0e7be7e7b5e7a019d0f4d14064c33</id>
<content type='text'>
</content>
</entry>
<entry>
<title>TU_MIN suggestion</title>
<updated>2026-07-26T19:16:23Z</updated>
<author>
<name>TenGui</name>
<email>cyrus.z.xu@gmail.com</email>
</author>
<published>2026-07-26T19:16:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=05f19ab438641823d047c811e7426177788d0490'/>
<id>urn:sha1:05f19ab438641823d047c811e7426177788d0490</id>
<content type='text'>
</content>
</entry>
<entry>
<title>save without formatting</title>
<updated>2026-07-23T22:59:12Z</updated>
<author>
<name>TenGui</name>
<email>cyrus.z.xu@gmail.com</email>
</author>
<published>2026-07-23T22:59:12Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=ff0683d5f827a0db546f026a16abfa48b8dc67e1'/>
<id>urn:sha1:ff0683d5f827a0db546f026a16abfa48b8dc67e1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>also fix tusb_types</title>
<updated>2026-07-23T22:58:28Z</updated>
<author>
<name>TenGui</name>
<email>cyrus.z.xu@gmail.com</email>
</author>
<published>2026-07-23T22:58:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=ca198f3dac0b61f3a13bc3319223ed37511e568c'/>
<id>urn:sha1:ca198f3dac0b61f3a13bc3319223ed37511e568c</id>
<content type='text'>
</content>
</entry>
</feed>
