summaryrefslogtreecommitdiff
path: root/examples/device/audio_test/src/plot_audio_samples.py
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-06-13 00:22:03 +0700
committerhathach <[email protected]>2026-06-13 23:34:57 +0700
commit3b73ee7e926d228bfa6ea4961d15a11a0310ed44 (patch)
tree645c27eeb69b2ada40dd1fa5214cebc1422fef3f /examples/device/audio_test/src/plot_audio_samples.py
parent91608e3c4f8c944674547e5c254759c1dda08379 (diff)
dcd/musb: gate stale EP0 RXRDY interrupts with rxrdy_consumed
The deferral path drains the SETUP but leaves RxPktRdy set, and the SETUP's IRQ latches after the ISR's clear-on-read intr_tx read - so a second process_ep0 pass (same ISR, via the intr_tx re-read merge) is guaranteed and misreads the leftovers: count0==0 fires a spurious DATA OUT completion, the replay's RXRDYC write turns the second pass into a phantom csrl==0 DATA IN completion, and a zero-length replay re-enters the deferral case on a drained FIFO (count0 assert or garbage saved as a SETUP). The registers cannot expose the staleness: RxPktRdy and count0 read unchanged until ServicedRxPktRdy is written. Track it in software: rxrdy_consumed means "RxPktRdy is set in hw but its packet was already consumed". Set wherever a drained packet's RXRDY is intentionally left set (OUT/zero-length flow-control parks, every DATA OUT drain awaiting the next arm, the deferral path); cleared at every RXRDYC write site (edpt0_xfer arms, dcd_set_address, STALLED/SETEND recovery, bus reset). The RXRDY block returns early while parked. Replayed IN requests skip the RXRDYC in pipe0_start_setup and keep the packet parked until the edpt0_xfer(DATA IN) arm acks it (before loading the shared FIFO), so the stale pass sees RXRDY+parked instead of csrl==0. The normal IDLE path is unchanged - master never re-entered these windows because the single SETUP edge was always consumed by the pass that parked it; the deferral is what introduced a pending second pass. Review follow-up for #3643 (dcd_musb.c l.516 finding). Co-Authored-By: Claude Fable 5 <[email protected]>
Diffstat (limited to 'examples/device/audio_test/src/plot_audio_samples.py')
0 files changed, 0 insertions, 0 deletions