summaryrefslogtreecommitdiff
path: root/lib/rt-thread/SConscript
diff options
context:
space:
mode:
authorHiFiPHile <[email protected]>2026-09-01 04:04:01 +0200
committerHiFiPHile <[email protected]>2026-09-02 15:21:41 +0200
commit4fb18bdc2bed03f7baa66bd4a550e5e6623d09f8 (patch)
tree97e5f856e99d238bd9c813b4fa54fccb132afff0 /lib/rt-thread/SConscript
parent3a81af3de30ee999b543af4e52408f3a6b9b5fdf (diff)
fix(dwc2): queue initial slave OUT packet immediately
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 <[email protected]>
Diffstat (limited to 'lib/rt-thread/SConscript')
0 files changed, 0 insertions, 0 deletions