<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tinyusb.git/src/portable/synopsys, 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/portable/synopsys?h=claude%2Fadd-systemview-debug</id>
<link rel='self' href='http://cgit.235523.xyz/tinyusb.git/atom/src/portable/synopsys?h=claude%2Fadd-systemview-debug'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/'/>
<updated>2026-09-02T14:18:44Z</updated>
<entry>
<title>fix(dwc2): bound periodic intervals to HFNUM range</title>
<updated>2026-09-02T14:18:44Z</updated>
<author>
<name>HiFiPHile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-09-02T14:18:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=e461c6f9c139a0012ef01d53db1aab1c68789b56'/>
<id>urn:sha1:e461c6f9c139a0012ef01d53db1aab1c68789b56</id>
<content type='text'>
HFNUM retains only 16384 host-frame positions, while valid periodic endpoint intervals can be longer. Resubmission after the counter wraps can therefore alias the elapsed time and skip the next established service phase.

Cap the host-selected interval to one HFNUM cycle using the root-port frame unit. USB permits a shorter host-provided period, and the bounded interval keeps phase calculation unambiguous for native and split endpoints.
</content>
</entry>
<entry>
<title>fix(dwc2): defer periodic DMA abort cleanup until halt</title>
<updated>2026-09-02T14:14:26Z</updated>
<author>
<name>HiFiPHile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-09-02T01:54:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=14060950b487f931d959699c42b0875c96ca6a01'/>
<id>urn:sha1:14060950b487f931d959699c42b0875c96ca6a01</id>
<content type='text'>
Periodic DMA channels use their natural service-boundary halt instead of a software CHDIS request. Keep the endpoint busy after an abort so a replacement transfer cannot reuse its state or buffer while the channel remains active.

When HCINT.HALTED arrives, release the channel without reporting completion for the aborted transfer. If endpoint closure is also pending, release the endpoint from the same halt path.
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'origin/master' into agent/fix-dwc2-host-fifo-allocation</title>
<updated>2026-09-02T13:21:41Z</updated>
<author>
<name>HiFiPHile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-09-01T15:44:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=51761d2dfdf2036395b0b6ada6fdde213f97416f'/>
<id>urn:sha1:51761d2dfdf2036395b0b6ada6fdde213f97416f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>DWC2 host: clean up channels on disconnect</title>
<updated>2026-09-02T13:21:41Z</updated>
<author>
<name>HiFiPHile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-09-01T05:06:47Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=3a1dc0dc1f57d45ed75aa9e176425901270e982e'/>
<id>urn:sha1:3a1dc0dc1f57d45ed75aa9e176425901270e982e</id>
<content type='text'>
A root-port disconnect invalidates every active transfer. Retire channel and FIFO interrupt sources plus host-channel state in the disconnect ISR using the Linux DWC2 cleanup model instead of reinitializing the core and PHY, which can sleep on STM32 HS PHYs.

Flush posted slave requests, request halts for enabled channels, clear channel interrupt and software ownership, and keep endpoint records closing until USBH processes the remove event. Reject transfer submissions to closing endpoints, preserve fast-replug notification, and re-enable the global host-channel interrupt when a new channel is initialized.
</content>
</entry>
<entry>
<title>fix(dwc2): queue initial slave OUT packet immediately</title>
<updated>2026-09-02T13:21:41Z</updated>
<author>
<name>HiFiPHile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-09-01T02:04:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=4fb18bdc2bed03f7baa66bd4a550e5e6623d09f8'/>
<id>urn:sha1:4fb18bdc2bed03f7baa66bd4a550e5e6623d09f8</id>
<content type='text'>
In slave mode, channel_xfer_start() enabled an OUT channel but left every FIFO write to a later PTXFEMP interrupt. DWC2 creates the request-queue entry only when the packet's final FIFO word is written, so unrelated interrupt work could consume the selected service frame before the transfer was actually queued.

Factor FIFO writes into a capacity-checked helper and write the initial packet while the channel-enable operation is still protected from DWC2 interrupts. Keep FIFO-empty interrupts only for data that does not fit immediately. The protected section never waits for FIFO or request-queue space.

When initial periodic OUT submission is too close to the frame boundary, release the unused channel and defer the still-pending endpoint to the next SOF. Internal retries bypass this initial boundary guard.

A hardware trace showed HCCHAR enabled for frame 0x0378 while the packet's final FIFO word was delayed until frame 0x03ae. The complete five-commit fix set passed 600 seconds in every O0/O2 and slave/DMA mode.

Signed-off-by: HiFiPHile &lt;admin@hifiphile.com&gt;
</content>
</entry>
<entry>
<title>fix(dwc2): enable periodic channels in the selected frame</title>
<updated>2026-09-02T08:50:03Z</updated>
<author>
<name>HiFiPHile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-09-01T02:02:54Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=3a81af3de30ee999b543af4e52408f3a6b9b5fdf'/>
<id>urn:sha1:3a81af3de30ee999b543af4e52408f3a6b9b5fdf</id>
<content type='text'>
Periodic IN and DMA-backed transfers selected ODDFRM before waiting for request-queue space. A DWC2 interrupt could also run between reading HFNUM and writing HCCHAR.CHENA, allowing the selected frame to pass while the transfer still appeared active.

Wait for request-queue capacity with controller interrupts enabled, then mask only GAHBCFG.GINT while sampling HFNUM and enabling a new periodic channel. Record the periodic phase from that same HFNUM sample so a boundary after channel enable cannot shift later interval calculations. The bounded critical section contains no queue wait, callback, disable, or allocation loop. Retries that already selected their frame bypass the new selection step.

Also clear a retained HCCHAR.CHDIS before every channel enable. A halted channel can otherwise be re-enabled as CHENA|CHDIS and wait for a terminal interrupt that never arrives.

Hardware traces captured periodic IN selections at frames 0x3303 and 0x3266 but activation only after 0x330c and 0x3273, respectively.
</content>
</entry>
<entry>
<title>fix(dwc2): fail missed isochronous frames</title>
<updated>2026-09-02T08:50:03Z</updated>
<author>
<name>HiFiPHile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-09-01T01:59:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=393694d842b454ecadd32760851be899a91d69af'/>
<id>urn:sha1:393694d842b454ecadd32760851be899a91d69af</id>
<content type='text'>
A frame-overrun interrupt means the selected periodic service interval has already been missed. Retrying an isochronous transfer after that point cannot deliver the original packet and can leave the class waiting indefinitely for a terminal result.

Enable frame-overrun interrupts for slave periodic channels. Complete isochronous IN and OUT overruns as XFER_RESULT_FAILED in both slave and DMA modes, accounting for bytes already written on OUT. Preserve the existing retry behavior for non-isochronous DMA transfers.

This reports the missed packet honestly through the normal HCD completion path: no fabricated success and no class-level abort workaround.
</content>
</entry>
<entry>
<title>fix(dwc2): let DMA periodic channels halt naturally</title>
<updated>2026-09-02T08:50:03Z</updated>
<author>
<name>HiFiPHile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-09-01T01:47:15Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=dea4d268d909d3063703bf9b431cabf6223479e1'/>
<id>urn:sha1:dea4d268d909d3063703bf9b431cabf6223479e1</id>
<content type='text'>
DWC2 buffer/external DMA mode automatically halts a periodic channel at its next service boundary. Programming HCCHAR.CHDIS|CHENA for a non-split periodic channel is explicitly disallowed by the controller programming guide, yet channel_disable() skipped that write only for split periodic transfers.

Return without programming channel disable for every periodic DMA channel. Non-periodic DMA and slave-mode channels retain the existing explicit-disable path.

The previous path reproduced after 420 seconds in O2/DMA with a closing capture transfer left INVALID while HCCHAR retained CHENA|CHDIS and HCINT was clear.
</content>
</entry>
<entry>
<title>fix(dwc2): preserve simultaneous slave channel halt</title>
<updated>2026-09-02T08:50:03Z</updated>
<author>
<name>HiFiPHile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-09-01T01:46:15Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=c023de98f44a6c0563e8addc2be3864887aa1d41'/>
<id>urn:sha1:c023de98f44a6c0563e8addc2be3864887aa1d41</id>
<content type='text'>
Slave-mode channel handlers process one interrupt cause per pass, but the dispatcher acknowledged every HCINT bit before invoking them. When ChHltd arrived together with another cause, the handler consumed the other cause and the halt was lost. A subsequent disable could then leave CHENA|CHDIS asserted with HCINT and HAINT clear, so the submitted periodic transfer never completed.

When a slave channel reports ChHltd with another cause, acknowledge only the non-halt causes and leave ChHltd pending for the next channel-IRQ pass. DMA handlers retain their existing combined-cause behavior.

The uninstrumented negative capture reproduced the lost terminal state with HCCHAR=0xe044881c, HCTSIZ=0x0008001c, HCINT=0, and XFER_RESULT_INVALID.
</content>
</entry>
<entry>
<title>fix(dwc2): serialize deferred transfer abort</title>
<updated>2026-09-02T08:50:03Z</updated>
<author>
<name>HiFiPHile</name>
<email>admin@hifiphile.com</email>
</author>
<published>2026-08-27T13:35:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/tinyusb.git/commit/?id=ee92fa7607c8eacac0ea44ffa09ece2d4e67a6f0'/>
<id>urn:sha1:ee92fa7607c8eacac0ea44ffa09ece2d4e67a6f0</id>
<content type='text'>
Protect periodic deferral cancellation from the SOF interrupt. Re-enable the host interrupt before disabling an active channel because slave-mode channel disable may wait for request-queue space.
</content>
</entry>
</feed>
