Skip to content

Commit

Permalink
drivers: udc_dwc2: Queue next packet on incomplete iso IN interrupt
Browse files Browse the repository at this point in the history
When handling incomplete iso IN interrupt mark current transfer as
complete and program the endpoint with any subsequently queued packet.
Program the endpoint directly in interrupt handler because the data
must be programmed before SOF (by the time incomplete iso IN interrupt
is raised there is less than 20% * 125 us = 25 us before SOF).

Signed-off-by: Tomasz Moń <[email protected]>
  • Loading branch information
tmon-nordic authored and kartben committed Nov 30, 2024
1 parent 8b212d8 commit edbb053
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/udc/udc_dwc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2572,7 +2572,11 @@ static void dwc2_handle_incompisoin(const struct device *dev)

buf = udc_buf_get(dev, cfg->addr);
if (buf) {
/* Data is no longer relevant */
udc_submit_ep_event(dev, buf, 0);

/* Try to queue next packet before SOF */
dwc2_handle_xfer_next(dev, cfg);
}
}
}
Expand Down

0 comments on commit edbb053

Please sign in to comment.