summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/portable/synopsys/dwc2/hcd_dwc2.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/portable/synopsys/dwc2/hcd_dwc2.c b/src/portable/synopsys/dwc2/hcd_dwc2.c
index 7cbef05b7..22f3bc70a 100644
--- a/src/portable/synopsys/dwc2/hcd_dwc2.c
+++ b/src/portable/synopsys/dwc2/hcd_dwc2.c
@@ -590,7 +590,7 @@ static bool channel_xfer_start(dwc2_regs_t* dwc2, uint8_t ch_id) {
hcintmsk |= HCINT_BABBLE_ERR | HCINT_DATATOGGLE_ERR | HCINT_ACK;
} else {
hcintmsk |= HCINT_NYET;
- if (edpt->hcsplt_bm.split_en) {
+ if (edpt->hcsplt_bm.split_en || hctsiz & HCTSIZ_DOPING) {
hcintmsk |= HCINT_ACK;
}
}
@@ -973,10 +973,17 @@ static bool handle_channel_out_slave(dwc2_regs_t* dwc2, uint8_t ch_id, uint32_t
} else if (hcint & HCINT_ACK) {
xfer->err_count = 0;
channel->hcintmsk &= ~HCINT_ACK;
- if (channel->hcsplt_bm.split_en && !channel->hcsplt_bm.split_compl) {
- // start split is ACK --> do complete split
- channel->hcsplt_bm.split_compl = 1;
- channel->hcchar |= HCCHAR_CHENA;
+ if (channel->hcsplt_bm.split_en) {
+ if(!channel->hcsplt_bm.split_compl) {
+ // start split is ACK --> do complete split
+ channel->hcsplt_bm.split_compl = 1;
+ channel->hcchar |= HCCHAR_CHENA;
+ }
+ } else {
+ // Device is ready, resume transfer
+ edpt->do_ping = 0;
+ xfer->err_count = 0;
+ TU_ASSERT(channel_xfer_start(dwc2, ch_id));
}
}