Skip to content

Commit be4b38c

Browse files
committed
Skip TXFE for EP0
Signed-off-by: HiFiPhile <admin@hifiphile.com>
1 parent cee7937 commit be4b38c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/portable/synopsys/dwc2/dcd_dwc2.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,8 @@ static void edpt_schedule_packets(uint8_t rhport, const uint8_t epnum, const uin
419419
const uint16_t xferred_bytes = epin_write_tx_fifo(rhport, epnum);
420420

421421
// Enable TXFE interrupt if there are still data to be sent
422-
if (xfer->total_len - xferred_bytes > 0) {
422+
// EP0 only sends one packet at a time, so no need to check for EP0
423+
if ((epnum != 0) && (xfer->total_len - xferred_bytes > 0)) {
423424
dwc2->diepempmsk |= (1u << epnum);
424425
}
425426
}

0 commit comments

Comments
 (0)